-
I have a unique situation where I have 2 different entry files that both use the same "alias" but each of those aliases need to point to different places for each entry file. In my case, it isn't an option to use 2 different alias names. The code uses a cascading/waterfall type of file resolution for the final product..... it's a long explanation but I just can't change the alias names. Both entry files need to use the same alias "name" but each alias needs to point to different places. However from what I can tell aliases are unique per Webpack configuration. Is it possible to have unique aliases per entry file? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
You can create loader and return different content based on your complex logic (look at |
Beta Was this translation helpful? Give feedback.
-
Actually aliases are not unique. They are part of the resolve options which can be different per module. You can use
|
Beta Was this translation helpful? Give feedback.
Actually aliases are not unique. They are part of the resolve options which can be different per module.
You can use
module.rules
to assign different aliases per module: