mirror of
https://github.com/systemjs/systemjs.git
synced 2026-01-25 14:57:38 +00:00
embed URL polyfill
This commit is contained in:
parent
9af28e625a
commit
18be7fa917
4
Makefile
4
Makefile
@ -72,6 +72,7 @@ dist/system.src.js: lib/*.js $(ESML)/*.js
|
||||
( echo "$$BANNER"; \
|
||||
cat \
|
||||
lib/wrapper-start.js \
|
||||
$(ESML)/url-polyfill.js \
|
||||
$(ESML)/wrapper-start.js \
|
||||
$(ESML)/loader.js \
|
||||
$(ESML)/dynamic-only.js \
|
||||
@ -107,6 +108,7 @@ dist/system-csp-production.src.js: lib/*.js $(ESML)/*.js
|
||||
( echo "$$BANNER"; \
|
||||
cat \
|
||||
lib/wrapper-start.js \
|
||||
$(ESML)/url-polyfill.js \
|
||||
$(ESML)/wrapper-start.js \
|
||||
$(ESML)/loader.js \
|
||||
$(ESML)/dynamic-only.js \
|
||||
@ -136,6 +138,7 @@ dist/system-csp-production.src.js: lib/*.js $(ESML)/*.js
|
||||
dist/system-register-only.src.js: lib/*.js $(ESML)/*.js
|
||||
( echo "$$BANNER"; \
|
||||
cat \
|
||||
$(ESML)/url-polyfill.js \
|
||||
$(ESML)/wrapper-start.js \
|
||||
$(ESML)/loader.js \
|
||||
$(ESML)/dynamic-only.js \
|
||||
@ -156,7 +159,6 @@ dist/system-polyfills.src.js: lib/*.js $(ESML)/*.js
|
||||
echo "(function(define) {"; \
|
||||
echo ""; \
|
||||
cat \
|
||||
$(ESML)/url-polyfill.js \
|
||||
node_modules/when/es6-shim/Promise.js \
|
||||
lib/polyfills-bootstrap.js; \
|
||||
echo "})();" \
|
||||
|
||||
@ -1,12 +1,7 @@
|
||||
}
|
||||
|
||||
// auto-load Promise and URL polyfills if needed in the browser
|
||||
try {
|
||||
var hasURL = typeof URLPolyfill != 'undefined' || new URL('test:///').protocol == 'test:';
|
||||
}
|
||||
catch(e) {}
|
||||
|
||||
var doPolyfill = typeof Promise === 'undefined' || !hasURL;
|
||||
// auto-load Promise polyfill if needed in the browser
|
||||
var doPolyfill = typeof Promise === 'undefined';
|
||||
|
||||
// document.write
|
||||
if (typeof document !== 'undefined') {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user