Replies: 2 comments 2 replies
-
It is described on docs, only identifiers replaced https://webpack.js.org/plugins/define-plugin/#usage, not functions |
Beta Was this translation helpful? Give feedback.
2 replies
-
define variable as (without "window." prefix in variable) works too:
|
Beta Was this translation helpful? Give feedback.
0 replies
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I try to replace function declaration with DefinePlugin and it worked with 4th version of webpack, but 5th (5.26.2) not;
I have repository with demo:
https://github.com/khats/storybook-demo
and issue reported to storybook project storybookjs/storybook#14257
In webpack config there is:
In code this declaration not replaced with DefinePlugin:
but this one:
compiled to:
I have added my note to storybook ticket too: storybookjs/storybook#14257 (comment)
Beta Was this translation helpful? Give feedback.
All reactions