babel-loader webpack

https://www.npmjs.com/package/babel-loader

yarn add babel-loader babel-core babel-preset-env webpack --dev

    module: {
        rules: [{
            test: /\.js$/,
            exclude: /node_modules/,
            use: {
                loader: 'babel-loader',
                options: {
                    presets: ['env']
                }
            }
        }]
    },

你可能感兴趣的:(babel-loader webpack)