tidy up webpack config

This commit is contained in:
Daniel Ternyak 2017-04-14 02:12:20 -05:00
parent ef10723d0a
commit 04d17f716e
3 changed files with 15 additions and 13 deletions

View File

@ -32,7 +32,6 @@ module.exports = {
containers: `${config.srcPath}/containers/`,
styles: `${config.srcPath}/styles/`,
less_vars: `${config.srcPath}/styles/etherwallet-variables.less`,
scss_vars: `${config.srcPath}/styles/vars.scss`,
config: `${config.srcPath}/config/` + process.env.REACT_WEBPACK_ENV
},
modules: [

View File

@ -10,7 +10,8 @@ base.devtool = 'eval-source-map'
base.module.loaders.push({
test: /\.css$/,
loaders: ['style-loader', 'css-loader', 'resolve-url-loader']
}, {
},
{
test: /\.scss$/,
loaders: ['style-loader', 'css-loader', 'resolve-url-loader', 'sass-loader']
},
@ -18,6 +19,7 @@ base.module.loaders.push({
test: /\.less$/,
loaders: ['style-loader', 'css-loader', 'resolve-url-loader', 'less-loader']
})
base.plugins.push(
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('development')

View File

@ -14,15 +14,6 @@ const config = require('./config')
exec('rm -rf dist/')
base.devtool = 'cheap-source-map'
base.module.loaders.push(
{
test: /\.less$/,
use: ExtractTextPlugin.extract(
{
fallback: 'style-loader',
use: ['css-loader','less-loader']
}
)
},
{
test: /\.css$/,
use: ExtractTextPlugin.extract(
@ -31,14 +22,24 @@ base.module.loaders.push(
use: 'css-loader'
}
)
}, {
},
{
test: /\.scss$/,
use: ExtractTextPlugin.extract(
{
fallback: 'style-loader',
use: ['css-loader', 'sass-loader']
}
),
)
},
{
test: /\.less$/,
use: ExtractTextPlugin.extract(
{
fallback: 'style-loader',
use: ['css-loader', 'less-loader']
}
)
}
)
// a white list to add dependencies to vendor chunk