Z
Z
zwezew2018-08-31 16:18:32
JavaScript
zwezew, 2018-08-31 16:18:32

Why can't babel work when webpack builds?

Why can't babel work when webpack builds?
The babel
IE10 setup continues to swear at const, scattered throughout the js file.

module.exports = {
    module: {
        rules: [
            {
                test: /\.js$/,
                exclude: [/node_modules/],
                //use: 'babel-loader',
        use: [{
          loader: 'babel-loader',
          options: {
            presets: [
              ['env', {
                'uglify': true,
                "targets": {
                  "browsers": [
                    "ie >= 9"
                  ]
                },
              }],
              //['es2015', {
              //	"uglify": true,
              //}],							
            ]
          }
        }]
            }
        ]
    }
};

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dgentleman666, 2018-09-09
@dgentleman666

Look at the readme of the babel loader, env and exclude are transferred differently there

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question