V
V
Vitaly2019-01-10 19:00:33
webpack
Vitaly, 2019-01-10 19:00:33

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

1 answer(s)
A
Anatoly Zharov, 2019-01-10
@vitali1995

try like this
https://webpack.js.org/configuration/externals/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question