[Vuejs]-Vue.js + Webpack-Dev-Server CSS URL's

2👍

Figured out the configuration

config/vue-loader.conf.js has a property extract when set to true adds the ExtractTextPlugin as the last loader to output a file. Set this to true for your dev.conf

Then, in your dev configuration, add the ExtractTextPlugin to your plugin stack and add the filename convention you want to source your file as.

NOTE: you will also need to configure the public path on the devServer config to be your containers {host}:{port}

I’ve forked the source template and added the configuration for reference/use

https://github.com/ibejohn818/vuejs-webpack-docker

Hope this helps somebody as I can see this as a common use-case and was unable to find any exact reference after days of googling.

👤John

Leave a comment