Skip to content

Commit

Permalink
docs: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fi3ework committed May 30, 2024
1 parent 9df7b05 commit d21f101
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,11 @@ The function should return the updated Rsbuild configuration.

### Error caused by bundling unexpected files

Because Rspack temporarily does not support the `webpackInclude` magic comment, non-story files may be bundled, which could lead to build failures. These files can be ignored using `rspack.IgnorePlugin`.
Because Rspack temporarily does not support the `webpackInclude` magic comment, non-story files may be bundled, which could lead to build failures. These files can be ignored using `rspack.IgnorePlugin` (see exmaple https://github.com/rspack-contrib/storybook-rsbuild/issues/19).

```js
// .storybook/main.js
import path from 'path'
import { mergeRsbuildConfig } from '@rsbuild/core'

export default {
Expand All @@ -136,7 +137,7 @@ export default {
new rspack.IgnorePlugin({
checkResource: (resource, context) => {
// for example, ignore all markdown files
const absPathHasExt = extname(resource)
const absPathHasExt = path.extname(resource)
if (absPathHasExt === '.md') {
return true
}
Expand Down

0 comments on commit d21f101

Please sign in to comment.