Skip to content

Commit

Permalink
chore: update the example
Browse files Browse the repository at this point in the history
  • Loading branch information
SoonIter committed Dec 18, 2024
1 parent 36048f8 commit f69454d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion examples/react-component-bundle/rslib.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default defineConfig({
],
output: {
target: 'web',
assetPrefix: 'auto', // FIXME: move this line to packages/core/src/asset/assetConfig.ts
assetPrefix: 'auto', // TODO: move this line to packages/core/src/asset/assetConfig.ts
},
plugins: [pluginReact(), pluginSass()],
});
5 changes: 2 additions & 3 deletions packages/core/src/asset/assetConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ export const composeAssetConfig = (
if (bundle) {
return {
output: {
// default: no inline asset
dataUriLimit: 0,
// assetPrefix: 'auto', // will turn on this with `preserveImport`
dataUriLimit: 0, // default: no inline asset
// assetPrefix: 'auto', // TODO: will turn on this with js support together in the future
},
};
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
body {
// background: url(./logo.svg);
background: url(./logo.svg);
}
9 changes: 4 additions & 5 deletions tests/integration/style/sass/__fixtures__/src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
// @import '~lib1/index.css';
@import './foundation/index.scss';

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

// .url-variable {
// background: url($url);
// }
.url-variable {
background: url($url);
}

.alert {
border: 1px solid $border-dark;
Expand Down
4 changes: 1 addition & 3 deletions tests/integration/style/sass/bundle/rslib.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ export default defineConfig({
],
output: {
target: 'web',
// dataUriLimit: {
// svg: 0,
// },
assetPrefix: 'auto', // TODO: move this line to packages/core/src/asset/assetConfig.ts
},
});

0 comments on commit f69454d

Please sign in to comment.