question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@storybook/marko: Add DefinePlugin to src/server/framework-preset-marko.js

See original GitHub issue

Describe 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:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
DylanPierceycommented, Jul 15, 2019

@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. 😄

0reactions
melquancommented, Jul 17, 2019

Closing per Dylan’s comment.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found