webpack providePlugin #15631
Unanswered
wangcongyi
asked this question in
Q&A
Replies: 2 comments 2 replies
-
const url = new URL(...); webpack.config.js module.exports = {
plugins: [
new ProvidedPlugin({ URL: "./my-url" })
]
}; so resulted code would looks like import URL from "./my-url";
const url = new URL(...); |
Beta Was this translation helpful? Give feedback.
1 reply
-
@vankop Maybe i need more information. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Accodrding to the webpack doc.
providePlugin can
Automatically load modules instead of having to import or require them everywhere
so can i
put
all the modules in providePlugin ? ( includereact
redux
react-redux
. )what situation or condition can put modules in providePlugin ?
what difference bettween put in providePlugin and not after build ?
Beta Was this translation helpful? Give feedback.
All reactions