mirror of
https://github.com/jlengrand/webcomponentsjs.git
synced 2026-03-10 08:51:22 +00:00
fix IE11 build
This commit is contained in:
@@ -17,7 +17,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
import '../bower_components/webcomponents-platform/webcomponents-platform.js'
|
||||
import '../bower_components/URL/url.js'
|
||||
import '../bower_components/template/template.js'
|
||||
import '../bower_components/es6-promise/lib/es6-promise.js'
|
||||
import '../bower_components/es6-promise/dist/es6-promise.auto.min.js'
|
||||
import '../bower_components/html-imports/src/html-imports.js'
|
||||
import '../src/pre-polyfill.js'
|
||||
import '../bower_components/custom-elements/custom-elements.min.js'
|
||||
|
||||
16
gulpfile.js
16
gulpfile.js
@@ -33,16 +33,24 @@ const babiliConfig = {
|
||||
shouldPrintComment: singleLicenseComment()
|
||||
};
|
||||
|
||||
function minify(sourceName, fileName) {
|
||||
function minify(sourceName, fileName, needsContext) {
|
||||
if (!fileName)
|
||||
fileName = sourceName;
|
||||
|
||||
return rollup({
|
||||
var options = {
|
||||
entry: './entrypoints/' + sourceName + '-index.js',
|
||||
format: 'iife',
|
||||
moduleName: 'webcomponentsjs',
|
||||
sourceMap: true
|
||||
})
|
||||
}
|
||||
|
||||
// The es6-promise polyfill needs to set the correct context.
|
||||
// See https://github.com/rollup/rollup/wiki/Troubleshooting#this-is-undefined
|
||||
if (needsContext) {
|
||||
options.context = 'window';
|
||||
};
|
||||
|
||||
return rollup(options)
|
||||
.pipe(source(sourceName +'-index.js'))
|
||||
.pipe(buffer())
|
||||
.pipe(sourcemaps.init({loadMaps: true}))
|
||||
@@ -69,7 +77,7 @@ gulp.task('minify-hi-ce-sd', () => {
|
||||
});
|
||||
|
||||
gulp.task('minify-hi-ce-sd-pf', () => {
|
||||
minify('webcomponents-hi-ce-sd-pf', 'webcomponents-lite')
|
||||
minify('webcomponents-hi-ce-sd-pf', 'webcomponents-lite', true)
|
||||
});
|
||||
|
||||
gulp.task('default', ['minify-none', 'minify-hi', 'minify-hi-ce', 'minify-hi-ce-sd', 'minify-hi-ce-sd-pf']);
|
||||
|
||||
@@ -10,7 +10,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Template with HTMLImports Test</title>
|
||||
<title>Integration Test</title>
|
||||
<script src="../webcomponents-loader.js"></script>
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
<link rel="import" href="imports/simple-element.html">
|
||||
|
||||
Reference in New Issue
Block a user