Files
edx-platform/webpack.dev.config.js
Feanil Patel 9a02c73936 fix: Use the default merge for webpack config.
The smart merge feature has been dropped from the webpack-merge library
that we were using. Use the basic merge feature instead since we're not
actually doing anything too complicated.

Also don't return null from the WorkerConfig as it can't be correctly
merged.
2025-09-19 12:52:33 -04:00

67 lines
2.2 KiB
JavaScript

/* eslint-env node */
'use strict';
var Merge = require('webpack-merge');
var path = require('path');
var webpack = require('webpack');
var _ = require('underscore');
var commonConfig = require('./webpack.common.config.js');
module.exports = _.values(Merge.merge(commonConfig, {
web: {
output: {
filename: '[name].js'
},
devtool: 'source-map',
plugins: [
new webpack.LoaderOptionsPlugin({
debug: true
}),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('development'),
'process.env.JS_ENV_EXTRA_CONFIG': process.env.JS_ENV_EXTRA_CONFIG || '{}',
'CAPTIONS_CONTENT_TO_REPLACE': JSON.stringify(process.env.CAPTIONS_CONTENT_TO_REPLACE || ''),
'CAPTIONS_CONTENT_REPLACEMENT': JSON.stringify(process.env.CAPTIONS_CONTENT_REPLACEMENT || '')
})
],
module: {
rules: [
{
test: /.scss$/,
include: [
/paragon/,
/font-awesome/
],
use: [
'style-loader',
{
loader: 'css-loader',
options: {
sourceMap: true,
modules: true,
localIdentName: '[name]__[local]'
}
},
{
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
}
}
]
}
]
},
watchOptions: {
ignored: ['/node_modules/', '/\.git/']
}
}
}));