Last try of using babel polyfill

This commit is contained in:
uwap 2018-08-12 16:41:07 +02:00
parent 2ba7935621
commit 774a447288
2 changed files with 3 additions and 8 deletions

View file

@ -1,12 +1,7 @@
{
"presets": [
["@babel/preset-env", {
modules: false,
useBuiltIns: "usage",
debug: true,
targets: {
browsers: ["iOS 5"]
}
modules: false
}],
"@babel/preset-react",
"@babel/preset-flow"

View file

@ -16,7 +16,7 @@ const configPath = env => {
module.exports = env => ({
entry: {
main: [configPath(env),
main: ["@babel/polyfill", configPath(env),
path.resolve(__dirname, 'src/index.jsx')]
},
resolve: {
@ -35,7 +35,7 @@ module.exports = env => ({
// TODO: CSS follow imports and minify + sourcemap on production
{ test: /\.css$/, use: [ 'style-loader', 'css-loader' ] },
{ test: /\.(woff2?|eot|ttf|svg)$/, loader: "file-loader" },
{ test: /\.js(x)?$/, exclude: /node_modules/, loader: "babel-loader?cacheDirectory=true" }
{ test: /\.js(x)?$/, loader: "babel-loader?cacheDirectory=true" }
]
},
plugins: [