Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): add distPath.assets and filename.assets #3688

Merged
merged 8 commits into from
Oct 13, 2024
Merged

Conversation

SoonIter
Copy link
Member

@SoonIter SoonIter commented Oct 12, 2024

Summary

feat(core): add distPath.assets and output.filename.assets

Related Links

close #3650

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copy link

netlify bot commented Oct 12, 2024

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit f5508d3
🔍 Latest deploy log https://app.netlify.com/sites/rsbuild/deploys/670b7d405fa17e000897e334
😎 Deploy Preview https://deploy-preview-3688--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 74 (🟢 up 1 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@SoonIter SoonIter changed the title fix fix(core): output 'asset/resource' to static/assets Oct 12, 2024
@SoonIter
Copy link
Member Author

😂 Strictly speaking, images svgs etc are also called assets.

@SoonIter SoonIter changed the title fix(core): output 'asset/resource' to static/assets feat(core): add 'distPath.assets' Oct 12, 2024
@SoonIter SoonIter changed the title feat(core): add 'distPath.assets' feat(core): add distPath.assets and output.filename.assets Oct 12, 2024
@SoonIter SoonIter marked this pull request as ready for review October 12, 2024 04:46
@SoonIter SoonIter changed the title feat(core): add distPath.assets and output.filename.assets feat(core): add distPath.assets and filename.assets Oct 12, 2024
Copy link
Member

@chenjiahan chenjiahan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to update the documentation, we can create another PR to add it.

@chenjiahan
Copy link
Member

😂 Strictly speaking, images svgs etc are also called assets.

Haha, all of them are assets, we have categorized the assets into subdirectories, which isn't bad.

website/docs/en/guide/basic/static-assets.mdx Outdated Show resolved Hide resolved
website/docs/zh/guide/basic/static-assets.mdx Outdated Show resolved Hide resolved
@@ -55,6 +57,7 @@ const prodDefaultFilename = {
- `font`:表示字体文件的名称。
- `image`:表示非 SVG 图片的名称。
- `media`:表示视频等媒体资源的名称。
- `assets`:表示除了上述类型之外,其他命中 `asset/resource` 的文件名称。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about linking to the Asset Module documentation?

The same as output.assetModuleFilename

image

Suggested change
- `assets`:表示除了上述类型之外,其他命中 `asset/resource` 的文件名称
- `assets`:表示除了上述类型之外,其他命中 [Asset Modules](https://rspack.dev/guide/features/asset-module) 规则的文件名称

Copy link
Member

@chenjiahan chenjiahan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@chenjiahan chenjiahan enabled auto-merge (squash) October 13, 2024 07:57
@chenjiahan chenjiahan merged commit 33e0d59 into main Oct 13, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: should output json asset to static folder, imported by new URL
2 participants