Update to use babel-polyfill to support ES6 features in old browsers

This commit is contained in:
Wu Cheng-Han 2017-02-03 22:04:43 +08:00
parent 1a617ddf2e
commit 5ce5d4cd84
2 changed files with 9 additions and 0 deletions

View file

@ -144,6 +144,7 @@
"babel-core": "^6.21.0", "babel-core": "^6.21.0",
"babel-loader": "^6.2.10", "babel-loader": "^6.2.10",
"babel-plugin-transform-runtime": "^6.15.0", "babel-plugin-transform-runtime": "^6.15.0",
"babel-polyfill": "^6.22.0",
"babel-preset-es2015": "^6.18.0", "babel-preset-es2015": "^6.18.0",
"babel-runtime": "^6.20.0", "babel-runtime": "^6.20.0",
"copy-webpack-plugin": "^4.0.1", "copy-webpack-plugin": "^4.0.1",

View file

@ -158,6 +158,7 @@ module.exports = {
"bootstrap" "bootstrap"
], ],
cover: [ cover: [
"babel-polyfill",
path.join(__dirname, 'public/js/cover.js') path.join(__dirname, 'public/js/cover.js')
], ],
"cover-styles-pack": [ "cover-styles-pack": [
@ -168,6 +169,7 @@ module.exports = {
path.join(__dirname, 'node_modules/select2/select2-bootstrap.css'), path.join(__dirname, 'node_modules/select2/select2-bootstrap.css'),
], ],
"cover-pack": [ "cover-pack": [
"babel-polyfill",
"bootstrap-validator", "bootstrap-validator",
"script!listPagnation", "script!listPagnation",
"expose?select2!select2", "expose?select2!select2",
@ -176,6 +178,7 @@ module.exports = {
path.join(__dirname, 'public/js/cover.js') path.join(__dirname, 'public/js/cover.js')
], ],
index: [ index: [
"babel-polyfill",
"script!jquery-ui-resizable", "script!jquery-ui-resizable",
"script!js-url", "script!js-url",
"expose?filterXSS!xss", "expose?filterXSS!xss",
@ -221,6 +224,7 @@ module.exports = {
path.join(__dirname, 'node_modules/octicons/octicons/octicons.css') path.join(__dirname, 'node_modules/octicons/octicons/octicons.css')
], ],
"index-pack": [ "index-pack": [
"babel-polyfill",
"expose?Spinner!spin.js", "expose?Spinner!spin.js",
"script!jquery-ui-resizable", "script!jquery-ui-resizable",
"bootstrap-validator", "bootstrap-validator",
@ -251,6 +255,7 @@ module.exports = {
path.join(__dirname, 'public/js/index.js') path.join(__dirname, 'public/js/index.js')
], ],
pretty: [ pretty: [
"babel-polyfill",
"expose?filterXSS!xss", "expose?filterXSS!xss",
"flowchart.js", "flowchart.js",
"js-sequence-diagrams", "js-sequence-diagrams",
@ -270,6 +275,7 @@ module.exports = {
path.join(__dirname, 'node_modules/octicons/octicons/octicons.css') path.join(__dirname, 'node_modules/octicons/octicons/octicons.css')
], ],
"pretty-pack": [ "pretty-pack": [
"babel-polyfill",
"expose?jsyaml!js-yaml", "expose?jsyaml!js-yaml",
"script!mermaid", "script!mermaid",
"expose?moment!moment", "expose?moment!moment",
@ -285,6 +291,7 @@ module.exports = {
path.join(__dirname, 'public/js/pretty.js') path.join(__dirname, 'public/js/pretty.js')
], ],
slide: [ slide: [
"babel-polyfill",
"bootstrap-tooltip", "bootstrap-tooltip",
"expose?filterXSS!xss", "expose?filterXSS!xss",
"flowchart.js", "flowchart.js",
@ -304,6 +311,7 @@ module.exports = {
path.join(__dirname, 'node_modules/octicons/octicons/octicons.css') path.join(__dirname, 'node_modules/octicons/octicons/octicons.css')
], ],
"slide-pack": [ "slide-pack": [
"babel-polyfill",
"expose?jQuery!expose?$!jquery", "expose?jQuery!expose?$!jquery",
"velocity-animate", "velocity-animate",
"imports?$=jquery!jquery-mousewheel", "imports?$=jquery!jquery-mousewheel",