Is there any way to implement a function similar to ProvidePlugin? #76283
Answered
by
unu0
Kane-Kuroneko
asked this question in
Help
-
SummaryI need to auto-import some modules without manually importing them, but there is no material available at all. Should I fall back to Webpack for a complete build experience? Additional informationimport type { NextConfig } from "next";
const nextConfig: NextConfig = {
compiler:{
//Any way like this ?
provide : {
"$" : ["jquery"],
"_":["lodash"]
}
}
};
export default nextConfig; ExampleNo response |
Beta Was this translation helpful? Give feedback.
Answered by
unu0
Feb 24, 2025
Replies: 1 comment 2 replies
-
you can create a global util. Here’s how to do it:
|
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
Kane-Kuroneko
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you can create a global util.
Here’s how to do it: