You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vuejs_spa/build/webpack.client.config.js

22 lines
717 B
JavaScript

7 years ago
const base = require('./webpack.base.config')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
7 years ago
//extends the base config object and include the new property plugins
const config = Object.assign({}, base, {
plugins: base.plugins || []
})
// We are using this because base config will be used for server side rendering
// but we don't need to extractCSS in that process only in our dev process
config.module.rules
.filter(x => { return x.loader == 'vue-loader'})
.forEach( x=> x.options.extractCSS = true)
config.plugins.push(
// This plugin accepts the file in which we want to save our styles
new ExtractTextPlugin('assets/styles.css')
)
7 years ago
module.exports = config