refactor: dev mode
This commit is contained in:
@@ -19,10 +19,8 @@ module.exports = {
|
||||
},
|
||||
output: {
|
||||
path: path.join(process.cwd(), 'assets'),
|
||||
pathinfo: true,
|
||||
filename: 'js/[name].js',
|
||||
chunkFilename: 'js/[name].chunk.js',
|
||||
publicPath: '/'
|
||||
chunkFilename: 'js/[name].chunk.js'
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
@@ -86,6 +84,7 @@ module.exports = {
|
||||
loader: 'vue-loader',
|
||||
options: {
|
||||
extractCSS: true,
|
||||
postcss: postCSSConfig,
|
||||
loaders: {
|
||||
css: [
|
||||
{
|
||||
@@ -93,10 +92,6 @@ module.exports = {
|
||||
},
|
||||
{
|
||||
loader: 'css-loader'
|
||||
},
|
||||
{
|
||||
loader: 'postcss-loader',
|
||||
options: postCSSConfig
|
||||
}
|
||||
],
|
||||
scss: [
|
||||
@@ -106,10 +101,6 @@ module.exports = {
|
||||
{
|
||||
loader: 'css-loader'
|
||||
},
|
||||
{
|
||||
loader: 'postcss-loader',
|
||||
options: postCSSConfig
|
||||
},
|
||||
{
|
||||
loader: 'sass-loader',
|
||||
options: {
|
||||
|
@@ -1,19 +1,28 @@
|
||||
const webpack = require('webpack')
|
||||
const merge = require('webpack-merge')
|
||||
const path = require('path')
|
||||
|
||||
const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
||||
|
||||
const common = require('./webpack.common.js')
|
||||
|
||||
module.exports = merge(common, {
|
||||
module: {
|
||||
rules: []
|
||||
entry: {
|
||||
client: ['./client/index.js', 'webpack-hot-middleware/client']
|
||||
},
|
||||
output: {
|
||||
pathinfo: true,
|
||||
publicPath: '/'
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': JSON.stringify('development')
|
||||
}),
|
||||
new ExtractTextPlugin({ disable: true })
|
||||
new ExtractTextPlugin({ disable: true }),
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
new webpack.WatchIgnorePlugin([
|
||||
/node_modules/
|
||||
])
|
||||
],
|
||||
resolve: {}
|
||||
watch: true
|
||||
})
|
||||
|
Reference in New Issue
Block a user