@storybook/marko: Add DefinePlugin to src/server/framework-preset-marko.js
See original GitHub issueDescribe the solution you’d like Add DefinePlugin to src/server/framework-preset-marko.js to set an environment variable.
const { DefinePlugin } = require('webpack');
...
plugins: [...config.plugins, new DefinePlugin({
"process.env.BUNDLE": true
})],
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
DefinePlugin | webpack
Its main purpose is to bundle JavaScript files for usage in a browser, ... The DefinePlugin replaces variables in your code with other...
Read more >How to include and use DefinePlugin in webpack config?
Hi there i am trying to use the define plugin so i can update the version number to make sure my JS ......
Read more >Environment Variables : Webpack config using DefinePlugin
Specify environment variables in webpack configuration file; importing variables from js file containing various constants. Import Environment ...
Read more >Defining Plugins with Webpack - Mastering JS
Webpack's DefinePlugin() function lets you replace a given token in the compiled code with another token. A common use case is using it...
Read more >Leveraging the Webpack Define Plugin in SPFx Projects
js code goes here... // add the following to the end of a default project's gulpfile.js build.configureWebpack.mergeConfig({ ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@shilman it is needed for a subset of Marko API’s and should probably be set by default for Marko apps.
I will be personally integrating storybook with Marko into some apps shortly and I’ll put up a PR for this and #7404 to make sure all is running smoothly. 😄
Closing per Dylan’s comment.