diff --git a/e2e/cases/assets/styles-as-assets/index.test.ts b/e2e/cases/assets/styles-as-assets/index.test.ts index b0daeceac3..bd8e0af919 100644 --- a/e2e/cases/assets/styles-as-assets/index.test.ts +++ b/e2e/cases/assets/styles-as-assets/index.test.ts @@ -32,7 +32,7 @@ rspackOnlyTest( expect(files[test1!]).toContain('body{color:red}'); expect(files[test2!]).toContain('& .foo'); expect(files[test3!]).toContain('& .foo'); - expect(files[test4!]).toContain('& .foo'); + expect(files[test4!]).toContain('color yellow'); expect(await page.evaluate('window.test1')).toBe( `http://localhost:${rsbuild.port}/static/assets/test1.css`, ); diff --git a/e2e/cases/assets/styles-as-assets/src/test4.styl b/e2e/cases/assets/styles-as-assets/src/test4.styl index d9609bedbf..f38bcf998b 100644 --- a/e2e/cases/assets/styles-as-assets/src/test4.styl +++ b/e2e/cases/assets/styles-as-assets/src/test4.styl @@ -1,5 +1,3 @@ -body { - & .foo { - color: yellow; - } -} +body + .foo + color yellow diff --git a/e2e/cases/solid/stylus/src/App.styl b/e2e/cases/solid/stylus/src/App.styl index 878032a791..43646ce741 100644 --- a/e2e/cases/solid/stylus/src/App.styl +++ b/e2e/cases/solid/stylus/src/App.styl @@ -1,8 +1,8 @@ -color = #ff3e00; +color = #ff3e00 .main h1 - color: color - text-transform: uppercase - font-size: 4em - font-weight: 100 \ No newline at end of file + color color + text-transform uppercase + font-size 4em + font-weight 100 diff --git a/e2e/cases/stylus/basic/src/b.module.styl b/e2e/cases/stylus/basic/src/b.module.styl index 0a634441bb..f4b82b61da 100644 --- a/e2e/cases/stylus/basic/src/b.module.styl +++ b/e2e/cases/stylus/basic/src/b.module.styl @@ -1,2 +1,2 @@ .title-class - font-size: 14px; + font-size 14px diff --git a/e2e/cases/stylus/environment/src/b.module.styl b/e2e/cases/stylus/environment/src/b.module.styl index 0a634441bb..f4b82b61da 100644 --- a/e2e/cases/stylus/environment/src/b.module.styl +++ b/e2e/cases/stylus/environment/src/b.module.styl @@ -1,2 +1,2 @@ .title-class - font-size: 14px; + font-size 14px diff --git a/e2e/cases/stylus/rem/src/b.module.styl b/e2e/cases/stylus/rem/src/b.module.styl index 0a634441bb..f4b82b61da 100644 --- a/e2e/cases/stylus/rem/src/b.module.styl +++ b/e2e/cases/stylus/rem/src/b.module.styl @@ -1,2 +1,2 @@ .title-class - font-size: 14px; + font-size 14px diff --git a/packages/core/src/createRsbuild.ts b/packages/core/src/createRsbuild.ts index 97620a2e95..f95c74f87a 100644 --- a/packages/core/src/createRsbuild.ts +++ b/packages/core/src/createRsbuild.ts @@ -276,7 +276,7 @@ export async function createRsbuild( return; } - // The current environment is not specified, skip it + // If the current environment is not specified, skip it if ( context.specifiedEnvironments && !context.specifiedEnvironments.includes(name)