0👍
✅
Issue fixed by updating the configuration
const {VueLoaderPlugin} = require('vue-loader');
let Encore = require('@symfony/webpack-encore');
Encore
.setOutputPath('public/build/')
.setPublicPath('/build')
.cleanupOutputBeforeBuild()
.enableSourceMaps(!Encore.isProduction())
.addEntry('app', './assets/js/app.js')
.addLoader({
test: /\.vue$/,
loader: 'vue-loader'
})
.enableBuildNotifications()
.addPlugin(new VueLoaderPlugin())
.enableSassLoader()
.enableVersioning(Encore.isProduction())
.configureBabel(function(babelConfig) {
// add additional presets
// babelConfig.presets.push('@babel/preset-flow');
// no plugins are added by default, but you can add some
// babelConfig.plugins.push('styled-jsx/babel');
}, {
// node_modules is not processed through Babel by default
// but you can whitelist specific modules to process
// includeNodeModules: ['foundation-sites'],
// or completely control the exclude rule (note that you
// can't use both "includeNodeModules" and "exclude" at
// the same time)
exclude: /loadash/
});
module.exports = Encore.getWebpackConfig();
Source:stackexchange.com