2017-04-12 04:59:58 +00:00
|
|
|
'use strict'
|
|
|
|
process.env.NODE_ENV = 'development'
|
|
|
|
|
|
|
|
const webpack = require('webpack')
|
|
|
|
const base = require('./webpack.base')
|
|
|
|
const FriendlyErrors = require('friendly-errors-webpack-plugin')
|
|
|
|
|
2017-05-25 00:06:30 +00:00
|
|
|
base.devtool = 'source-map'
|
2017-04-12 04:59:58 +00:00
|
|
|
base.module.loaders.push({
|
|
|
|
test: /\.css$/,
|
|
|
|
loaders: ['style-loader', 'css-loader', 'resolve-url-loader']
|
2017-04-14 07:12:20 +00:00
|
|
|
},
|
|
|
|
{
|
2017-04-12 04:59:58 +00:00
|
|
|
test: /\.scss$/,
|
|
|
|
loaders: ['style-loader', 'css-loader', 'resolve-url-loader', 'sass-loader']
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.less$/,
|
|
|
|
loaders: ['style-loader', 'css-loader', 'resolve-url-loader', 'less-loader']
|
|
|
|
})
|
2017-04-14 07:12:20 +00:00
|
|
|
|
2017-04-12 04:59:58 +00:00
|
|
|
base.plugins.push(
|
|
|
|
new webpack.DefinePlugin({
|
|
|
|
'process.env.NODE_ENV': JSON.stringify('development')
|
|
|
|
}),
|
|
|
|
new webpack.HotModuleReplacementPlugin(),
|
|
|
|
new webpack.NoEmitOnErrorsPlugin(),
|
|
|
|
new FriendlyErrors()
|
|
|
|
)
|
|
|
|
|
|
|
|
module.exports = base
|