Answer the question
In order to leave comments, you need to log in
How to specify to use an external library when building webpack?
There is an app in React. Task: write a module that will be loaded from a separate domain and built into the application.
When building, you need to tell the module to use the React library from the external connecting application, and not add it to your bundle again. There is access to the main application (i.e., you can pass React when connecting the module), but these 2 parts must be in different projects.
How can I do that?
Answer the question
In order to leave comments, you need to log in
try like this
https://webpack.js.org/configuration/externals/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question