-
-
Notifications
You must be signed in to change notification settings - Fork 199
Description
When trying to compile code with Vue-loader, I get a bunch of the following error:
vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config.
When I manually add the VueLoaderPlugin in my webpack.config.js, I get the following error:
Module build failed: ReferenceError: [BABEL] /Users/bgore/Sites/demads.test/public_html/assets/js/organization/Advertiser.vue: Unknown option: base.omit. Check out http://babeljs.io/docs/usage/options/ for more information about options.
A common cause of this error is the presence of a configuration options object without the corresponding preset name
I imagine this is a problem with my local setup, probably not a bug, but I'm not sure. I can't seem to find anything about this on the wider web.
Config file looks thus:
const { VueLoaderPlugin } = require('vue-loader')
var Encore = require('@symfony/webpack-encore');
Encore
// Project directory where assets will be stored
.setOutputPath('assets/build')
// public path used by the web server
.setPublicPath('/assets/build')
// Enable Source maps in dev
.enableSourceMaps(!Encore.isProduction())
// Cleanup output dir before build
.cleanupOutputBeforeBuild()
// Show notications
.enableBuildNotifications()
// Enable SASS/SCSS compilation
.enableSassLoader()
// Enable Vue SFC compilation
.enableVueLoader()
// Tried with and without this
.addPlugin(new VueLoaderPlugin())
.addEntry('organization/advertiser', './assets/js/organization/advertiser.js');
module.exports = Encore.getWebpackConfig();
Install was done exactly as described on the Symfony site.
Any pointers are greatly appreciated.