-
Notifications
You must be signed in to change notification settings - Fork 193
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: add wildcards #439
feat: add wildcards #439
Conversation
We will need to improve documentation after merge - https://webpack.js.org/configuration/resolve/#resolvealias, can you help me? thank you |
yes, I can |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #439 +/- ##
==========================================
+ Coverage 91.99% 92.50% +0.50%
==========================================
Files 44 44
Lines 2124 2135 +11
Branches 645 657 +12
==========================================
+ Hits 1954 1975 +21
+ Misses 138 131 -7
+ Partials 32 29 -3 ☔ View full report in Codecov by Sentry. |
``` alias: { '@*': path.resolve(__dirname, 'src/*'), // maps @something to path/to/something } ``` Ported from webpack/enhanced-resolve#439 Please note there is a small behaviour difference when compared to TypeScript's path alias resolve: In TypeScript, when multiple patterns match a module specifier, the pattern with the longest matching prefix before any * token is used: https://www.typescriptlang.org/docs/handbook/modules/reference.html#wildcard-substitutions In enhanced-resolved's alias plugin, first match alias key (in declaration order) wins. closes #385 closes #386
``` alias: { '@*': path.resolve(__dirname, 'src/*'), // maps `@something` to `path/to/something` } ``` Ported from webpack/enhanced-resolve#439 Please note there is a small behaviour difference when compared to TypeScript's path alias resolve: In TypeScript, when multiple patterns match a module specifier, the pattern with the longest matching prefix before any * token is used: https://www.typescriptlang.org/docs/handbook/modules/reference.html#wildcard-substitutions In enhanced-resolved's alias plugin, first matched alias key (in declaration order) wins. closes #385 closes #386
Closes webpack/webpack#19075
add wildcards pattern