fix(webpack5): angular scss rule not ignoring regular scss (#9502)

* fix(webpack5): angular scss rule not ignoring regular scss

* test: angular scss snapshot update
This commit is contained in:
Eduardo Speroni
2021-08-09 14:42:45 -03:00
committed by GitHub
parent 3bf55b7a04
commit 093b369b74
2 changed files with 6 additions and 6 deletions

View File

@ -231,8 +231,8 @@ exports[`angular configuration for android 1`] = `
{ {
test: /\\\\.scss$/, test: /\\\\.scss$/,
exclude: [ exclude: [
'__jest__/src/app.css', '__jest__/src/app.scss',
'__jest__/src/app.android.css', '__jest__/src/app.android.scss',
/node_modules/ /node_modules/
], ],
use: [ use: [
@ -616,8 +616,8 @@ exports[`angular configuration for ios 1`] = `
{ {
test: /\\\\.scss$/, test: /\\\\.scss$/,
exclude: [ exclude: [
'__jest__/src/app.css', '__jest__/src/app.scss',
'__jest__/src/app.ios.css', '__jest__/src/app.ios.scss',
/node_modules/ /node_modules/
], ],
use: [ use: [

View File

@ -83,8 +83,8 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
// and instead use raw-loader, since that's what angular expects // and instead use raw-loader, since that's what angular expects
config.module config.module
.rule('scss|component') .rule('scss|component')
.exclude.add(resolve(getEntryDirPath(), 'app.css')) .exclude.add(resolve(getEntryDirPath(), 'app.scss'))
.add(resolve(getEntryDirPath(), `app.${platform}.css`)) .add(resolve(getEntryDirPath(), `app.${platform}.scss`))
.add(/node_modules/) .add(/node_modules/)
.end() .end()
.test(/\.scss$/) .test(/\.scss$/)