Webpack config prod/dev split
EDUCATOR-1448 Modifies paver webpack task to use production configuration in all non-devstack environments, and a development config in devstack.
This commit is contained in:
53
webpack.dev.config.js
Normal file
53
webpack.dev.config.js
Normal file
@@ -0,0 +1,53 @@
|
||||
/* eslint-env node */
|
||||
|
||||
'use strict';
|
||||
|
||||
var Merge = require('webpack-merge');
|
||||
var path = require('path');
|
||||
var webpack = require('webpack');
|
||||
|
||||
var commonConfig = require('./webpack.common.config.js');
|
||||
|
||||
module.exports = Merge.smart(commonConfig, {
|
||||
output: {
|
||||
filename: '[name].js'
|
||||
},
|
||||
devtool: 'source-map',
|
||||
plugins: [
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
debug: true
|
||||
}),
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': JSON.stringify('development')
|
||||
})
|
||||
],
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /(.scss|.css)$/,
|
||||
include: [
|
||||
/studio-frontend/,
|
||||
/paragon/,
|
||||
/font-awesome/
|
||||
],
|
||||
use: [{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
modules: true,
|
||||
localIdentName: '[name]__[local]___[hash:base64:5]'
|
||||
}
|
||||
}, {
|
||||
loader: 'sass-loader',
|
||||
options: {
|
||||
data: '$base-rem-size: 0.625; @import "paragon-reset";',
|
||||
includePaths: [
|
||||
path.join(__dirname, './node_modules/@edx/paragon/src/utils'),
|
||||
path.join(__dirname, './node_modules/')
|
||||
],
|
||||
sourceMap: true
|
||||
}
|
||||
}]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user