I was able to point babel-loader at all .js files and that worked:// In webpack.mix.jsmix.webpackConfig({ module: { rules: [{ test: /\.js?$/, use: [{ loader: 'babel-loader', options: mix.config.babel() }] }] } });但是,如果使用更具体的 test 仅定位需要转换的模块,则可以减少编译时间:However your compile times will be reduced if use a more specific test to target only the modules you need to transpile: test: /node_modules\/(vuex-module-decorators|vuex-persist)\/.+\.js$/, 这篇关于Laravel Mix Transpile依赖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-23 21:34