Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

add glob import section #561

Open
hardfist opened this issue Dec 12, 2023 · 1 comment
Open

add glob import section #561

hardfist opened this issue Dec 12, 2023 · 1 comment
Assignees

Comments

@hardfist
Copy link
Contributor

          `import.meta` is part of the ECMAScript standard but `require.context` is a webpack-only API.

I just found webpack has supported import.meta.webpackContext and Rspack also supports it: web-infra-dev/rspack#4466

We should document this and recommend users to use import.meta.webpackContext instead of require.context.

Originally posted by @chenjiahan in web-infra-dev/rspack#4986 (comment)

@hardfist
Copy link
Contributor Author

hardfist commented Dec 12, 2023

glob import is frequently used features which needs specific section tell user how to do it in Rspack like vite does https://vitejs.dev/guide/features.html#glob-import

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants