[Vuejs]-Encore Vue.js style compilation wrong folder

0👍

The recommended way to achieve what you want is by configuring your webpack.config.js like this:

.enableSassLoader()
.enableVueLoader()
.configureFilenames({
    css: 'css/[name].css',
    js: 'js/[name].js'
})
.addEntry('app', './assets/js/app.js')

Then in your assets/js/app.js file:

require('../scss/main.scss');
// your code

The above configuration will produce a build/js/app.js file and a build/css/app.css file (all your scss files compiled together into a single file).

Leave a comment