зеркало из https://github.com/microsoft/just.git
Styleoverlay fix to allow localIdentName to be used (#243)
* fixes styleoverlay * Change files
This commit is contained in:
Родитель
43fd18bd7b
Коммит
e0f7ceefa4
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"type": "patch",
|
||||
"comment": "fixes styleoverlay",
|
||||
"packageName": "just-scripts",
|
||||
"email": "kchau@microsoft.com",
|
||||
"commit": "9b93e3942e2aff9ae8693b8964d8319fcc2ae335",
|
||||
"date": "2019-09-16T23:28:48.524Z"
|
||||
}
|
|
@ -35,6 +35,17 @@ function createStyleLoaderRule(cssOptions: CssLoaderOptions, preprocessor: 'sass
|
|||
...(preprocessor ? [preprocessor] : [])
|
||||
];
|
||||
|
||||
const moduleOptions = cssOptions.localIdentName
|
||||
? {
|
||||
modules: {
|
||||
mode: 'local',
|
||||
localIdentName: cssOptions.localIdentName
|
||||
}
|
||||
}
|
||||
: {
|
||||
modules: cssOptions.modules
|
||||
};
|
||||
|
||||
return [
|
||||
{
|
||||
loader: styleLoader // creates style nodes from JS strings
|
||||
|
@ -42,7 +53,7 @@ function createStyleLoaderRule(cssOptions: CssLoaderOptions, preprocessor: 'sass
|
|||
{
|
||||
loader: 'css-loader', // translates CSS into CommonJS
|
||||
options: {
|
||||
...cssOptions,
|
||||
...moduleOptions,
|
||||
importLoaders: preloaders.length
|
||||
}
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче