Skip to content

Commit 70f3152

Browse files
authored
Merge pull request #5344 from bjester/rtl-menuuuu
Reinstate .styl noop replacement for production webpack builds
2 parents 1cec5db + a2ed4cb commit 70f3152

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// This file is used as a placeholder, following the same pattern established in
2+
// jest_config/globalMocks/fileMock.js
3+
4+
// It is used to help use properly overwrite the vuetify stylus files using webpack
5+
// (see also webpack.config.js > webpack.NormalModuleReplacementPlugin())
6+
7+
'module-file-stub';

webpack.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const process = require('node:process');
55
const fs = require('node:fs');
66
const { execSync } = require('node:child_process');
77

8+
const { NormalModuleReplacementPlugin } = require('webpack');
89
const baseConfig = require('kolibri-tools/lib/webpack.config.base');
910
const { merge } = require('webpack-merge');
1011
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
@@ -40,6 +41,7 @@ function getWSLIP() {
4041
const djangoProjectDir = path.resolve('contentcuration');
4142
const staticFilesDir = path.resolve(djangoProjectDir, 'contentcuration', 'static');
4243
const srcDir = path.resolve(djangoProjectDir, 'contentcuration', 'frontend');
44+
const dummyModule = path.resolve(srcDir, 'shared', 'styles', 'modulePlaceholder.js')
4345

4446
const bundleOutputDir = path.resolve(staticFilesDir, 'studio');
4547

@@ -186,6 +188,13 @@ module.exports = (env = {}) => {
186188
});
187189
if (dev) {
188190
config.entry.editorDev = './editorDev/index.js';
191+
} else {
192+
config.plugins.push(
193+
new NormalModuleReplacementPlugin(
194+
/styl$/,
195+
dummyModule
196+
),
197+
)
189198
}
190199
return config;
191200
};

0 commit comments

Comments
 (0)