-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support stylus in bundleless mode
- Loading branch information
1 parent
d213f43
commit 297dacb
Showing
12 changed files
with
314 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
body | ||
color red | ||
font 14px Arial, sans-serif | ||
background: url('./assets/logo.svg'); |
7 changes: 7 additions & 0 deletions
7
tests/integration/style/stylus/__fixtures__/src/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions
2
tests/integration/style/stylus/__fixtures__/src/b.module.styl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.title-class | ||
font-size: 14px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import './a.styl'; | ||
import style from './b.module.styl'; | ||
|
||
console.log(style); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "style-stylus-bundle-false-test", | ||
"version": "1.0.0", | ||
"private": true, | ||
"type": "module", | ||
"devDependencies": { | ||
"@rsbuild/plugin-stylus": "^1.0.7" | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
tests/integration/style/stylus/bundle-false/rslib.config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { pluginStylus } from '@rsbuild/plugin-stylus'; | ||
import { defineConfig } from '@rslib/core'; | ||
import { generateBundleCjsConfig, generateBundleEsmConfig } from 'test-helper'; | ||
|
||
export default defineConfig({ | ||
lib: [ | ||
generateBundleEsmConfig({ | ||
bundle: false, | ||
}), | ||
generateBundleCjsConfig({ | ||
bundle: false, | ||
}), | ||
], | ||
source: { | ||
entry: { | ||
index: ['../__fixtures__/src/**'], | ||
}, | ||
}, | ||
plugins: [pluginStylus()], | ||
output: { | ||
target: 'web', | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "style-stylus-bundle-test", | ||
"version": "1.0.0", | ||
"private": true, | ||
"type": "module", | ||
"devDependencies": { | ||
"@rsbuild/plugin-stylus": "^1.0.7" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { pluginStylus } from '@rsbuild/plugin-stylus'; | ||
import { defineConfig } from '@rslib/core'; | ||
import { generateBundleCjsConfig, generateBundleEsmConfig } from 'test-helper'; | ||
|
||
export default defineConfig({ | ||
lib: [generateBundleEsmConfig(), generateBundleCjsConfig()], | ||
source: { | ||
entry: { | ||
index: ['../__fixtures__/src/index.js'], | ||
}, | ||
}, | ||
plugins: [pluginStylus()], | ||
output: { | ||
target: 'web', | ||
}, | ||
}); |
Oops, something went wrong.