mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-11 03:26:14 +00:00
tidy up webpack config
This commit is contained in:
parent
ef10723d0a
commit
04d17f716e
@ -32,7 +32,6 @@ module.exports = {
|
|||||||
containers: `${config.srcPath}/containers/`,
|
containers: `${config.srcPath}/containers/`,
|
||||||
styles: `${config.srcPath}/styles/`,
|
styles: `${config.srcPath}/styles/`,
|
||||||
less_vars: `${config.srcPath}/styles/etherwallet-variables.less`,
|
less_vars: `${config.srcPath}/styles/etherwallet-variables.less`,
|
||||||
scss_vars: `${config.srcPath}/styles/vars.scss`,
|
|
||||||
config: `${config.srcPath}/config/` + process.env.REACT_WEBPACK_ENV
|
config: `${config.srcPath}/config/` + process.env.REACT_WEBPACK_ENV
|
||||||
},
|
},
|
||||||
modules: [
|
modules: [
|
||||||
|
@ -10,7 +10,8 @@ base.devtool = 'eval-source-map'
|
|||||||
base.module.loaders.push({
|
base.module.loaders.push({
|
||||||
test: /\.css$/,
|
test: /\.css$/,
|
||||||
loaders: ['style-loader', 'css-loader', 'resolve-url-loader']
|
loaders: ['style-loader', 'css-loader', 'resolve-url-loader']
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
test: /\.scss$/,
|
test: /\.scss$/,
|
||||||
loaders: ['style-loader', 'css-loader', 'resolve-url-loader', 'sass-loader']
|
loaders: ['style-loader', 'css-loader', 'resolve-url-loader', 'sass-loader']
|
||||||
},
|
},
|
||||||
@ -18,6 +19,7 @@ base.module.loaders.push({
|
|||||||
test: /\.less$/,
|
test: /\.less$/,
|
||||||
loaders: ['style-loader', 'css-loader', 'resolve-url-loader', 'less-loader']
|
loaders: ['style-loader', 'css-loader', 'resolve-url-loader', 'less-loader']
|
||||||
})
|
})
|
||||||
|
|
||||||
base.plugins.push(
|
base.plugins.push(
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
'process.env.NODE_ENV': JSON.stringify('development')
|
'process.env.NODE_ENV': JSON.stringify('development')
|
||||||
|
@ -14,15 +14,6 @@ const config = require('./config')
|
|||||||
exec('rm -rf dist/')
|
exec('rm -rf dist/')
|
||||||
base.devtool = 'cheap-source-map'
|
base.devtool = 'cheap-source-map'
|
||||||
base.module.loaders.push(
|
base.module.loaders.push(
|
||||||
{
|
|
||||||
test: /\.less$/,
|
|
||||||
use: ExtractTextPlugin.extract(
|
|
||||||
{
|
|
||||||
fallback: 'style-loader',
|
|
||||||
use: ['css-loader','less-loader']
|
|
||||||
}
|
|
||||||
)
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
test: /\.css$/,
|
test: /\.css$/,
|
||||||
use: ExtractTextPlugin.extract(
|
use: ExtractTextPlugin.extract(
|
||||||
@ -31,14 +22,24 @@ base.module.loaders.push(
|
|||||||
use: 'css-loader'
|
use: 'css-loader'
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
test: /\.scss$/,
|
test: /\.scss$/,
|
||||||
use: ExtractTextPlugin.extract(
|
use: ExtractTextPlugin.extract(
|
||||||
{
|
{
|
||||||
fallback: 'style-loader',
|
fallback: 'style-loader',
|
||||||
use: ['css-loader', 'sass-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
|
// a white list to add dependencies to vendor chunk
|
||||||
|
Loading…
x
Reference in New Issue
Block a user