Skip to content

Commit 85d2ec9

Browse files
committed
commented the regexp hacky fix for two modules w/ diff brand
1 parent 91d8bee commit 85d2ec9

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

webpack.config.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,18 @@ module.exports = {
108108
/*
109109
Workaround single module style by deleting the entire
110110
style tags and contents that matches the other brand
111+
112+
uncomment to see module "work" but for two styles with modules in a single file only,
113+
where both contain different brands to be filtered out. Doesn't work with two of the same
111114
*/
112-
{
113-
test: /\.vue$/,
114-
use: createLoader(function(source, map) {
115-
const brandStyleRemoval = new RegExp(`(<style)(.*)(brand=("|')?${otherBrands[0]}("|')?)(.*?)>(.|\n)*?(<\/style>)`, 'gmi');
116-
const sourceUnbranded = source?.replace(brandStyleRemoval, '');
117-
return sourceUnbranded ?? source
118-
}),
119-
},
115+
// {
116+
// test: /\.vue$/,
117+
// use: createLoader(function(source, map) {
118+
// const brandStyleRemoval = new RegExp(`(<style)(.*)(brand=("|')?${otherBrands[0]}("|')?)(.*?)>(.|\n)*?(<\/style>)`, 'gmi');
119+
// const sourceUnbranded = source?.replace(brandStyleRemoval, '');
120+
// return sourceUnbranded ?? source
121+
// }),
122+
// },
120123
{
121124
test: /\.js$/,
122125
use: {

0 commit comments

Comments
 (0)