Z
Z
zwezew2018-04-19 12:59:13
JavaScript
zwezew, 2018-04-19 12:59:13

How to make babel and plugins (webpack2) friends?

How to make babel and plugins (webpack2) friends? I found that some plugins when building via webpack with a bubble give errors, for example,
dx is not defined
in mCustomScrollbar Babel
settings

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

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question