Skip to content

Commit f69454d

Browse files
committed
chore: update the example
1 parent 36048f8 commit f69454d

File tree

5 files changed

+9
-13
lines changed

5 files changed

+9
-13
lines changed

examples/react-component-bundle/rslib.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default defineConfig({
2525
],
2626
output: {
2727
target: 'web',
28-
assetPrefix: 'auto', // FIXME: move this line to packages/core/src/asset/assetConfig.ts
28+
assetPrefix: 'auto', // TODO: move this line to packages/core/src/asset/assetConfig.ts
2929
},
3030
plugins: [pluginReact(), pluginSass()],
3131
});

packages/core/src/asset/assetConfig.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ export const composeAssetConfig = (
99
if (bundle) {
1010
return {
1111
output: {
12-
// default: no inline asset
13-
dataUriLimit: 0,
14-
// assetPrefix: 'auto', // will turn on this with `preserveImport`
12+
dataUriLimit: 0, // default: no inline asset
13+
// assetPrefix: 'auto', // TODO: will turn on this with js support together in the future
1514
},
1615
};
1716
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
body {
2-
// background: url(./logo.svg);
2+
background: url(./logo.svg);
33
}

tests/integration/style/sass/__fixtures__/src/index.scss

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33
// @import '~lib1/index.css';
44
@import './foundation/index.scss';
55

6-
// TODO: asset support
7-
// $url: './foundation/logo.svg';
6+
$url: './foundation/logo.svg';
87
$border-dark: rgba($base-color, 0.88);
98

10-
// .url-variable {
11-
// background: url($url);
12-
// }
9+
.url-variable {
10+
background: url($url);
11+
}
1312

1413
.alert {
1514
border: 1px solid $border-dark;

tests/integration/style/sass/bundle/rslib.config.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ export default defineConfig({
1818
],
1919
output: {
2020
target: 'web',
21-
// dataUriLimit: {
22-
// svg: 0,
23-
// },
21+
assetPrefix: 'auto', // TODO: move this line to packages/core/src/asset/assetConfig.ts
2422
},
2523
});

0 commit comments

Comments
 (0)