Commit 2895496
committed
When Webpack sees this dynamic import with template literals, it tries to bundle ALL matching .js files in the @fortawesome/ directories. This includes import.macro.js which is a Babel macro file that requires an internal FontAwesome development tool (@fortawesome-internal-tools/fontawesome-icons/canonical) that isn't published to npm.
The /* webpackExclude: /import\.macro/ */ magic comment tells Webpack to exclude any files matching the regex pattern import.macro when building the dynamic import context. This prevents Webpack from trying to bundle import.macro.js and its problematic internal dependency.1 parent 2ec5cda commit 2895496
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
276 | 279 | | |
277 | 280 | | |
278 | 281 | | |
| |||
0 commit comments