Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to disable minification when running build-storybook? #164

Closed
moroshko opened this issue May 5, 2016 · 13 comments
Closed

How to disable minification when running build-storybook? #164

moroshko opened this issue May 5, 2016 · 13 comments

Comments

@moroshko
Copy link

moroshko commented May 5, 2016

Is there a way not to minify the JS files when running build-storybook?

@arunoda
Copy link
Member

arunoda commented May 5, 2016

Currently there is no way. You need to change the webpack config and remove uglifyjs plugin.
You can try this: #160

@arunoda arunoda closed this as completed May 5, 2016
@moroshko
Copy link
Author

moroshko commented May 5, 2016

@arunoda Isn't #60 allows extending only webpack.config.js but not webpack.config.prod.js?

@arunoda
Copy link
Member

arunoda commented May 5, 2016

Okay. It's the production build. So, we need to support the production build too.
@mnmtanish could you find some way to add production webpack conf support to #160 as well.

@arunoda arunoda reopened this May 5, 2016
@thani-sh
Copy link
Contributor

thani-sh commented May 6, 2016

@moroshko @arunoda both use the config.js file to build the config so it should work out of the box. I'll check it out.

@moroshko
Copy link
Author

moroshko commented May 6, 2016

@mnmtanish As far as I can see, custom config is hardcoded to webpack.config.js, so we never check if a custom webpack.config.prod.js exists.

@arunoda
Copy link
Member

arunoda commented May 6, 2016

@moroshko I checked the code, yes it'll work for both alike.

@thani-sh
Copy link
Contributor

thani-sh commented May 6, 2016

@moroshko I also though at first that having 2 files will be easy and straightforward but it can cause some issues.

So far we're using custom config from webpack.config.js for both the dev-server and the production builds. If we use separate files, users who need the same custom config for both will have to make a copy of the file. Let's say we try to fix it by falling back to webpack.config.js if webpack.config.prod.js does not exist, it makes the config more ambiguous and some users may not want that to happen.

We can fix this for now by adding a configType argument to the config function. I've opened a pull request for this #169

@moroshko
Copy link
Author

moroshko commented May 6, 2016

@mnmtanish Thanks for #169. I'd just update the docs to reflect the changes.

@moroshko moroshko closed this as completed May 6, 2016
@arunoda
Copy link
Member

arunoda commented May 6, 2016

@moroshko Where did you update the docs?

@moroshko
Copy link
Author

moroshko commented May 6, 2016

@arunoda I didn't. I suggested @mnmtanish to update the docs as part of #169.

@arunoda
Copy link
Member

arunoda commented May 6, 2016

@moroshko Ah okay. BTW: I did it.

@moroshko
Copy link
Author

moroshko commented May 6, 2016

Thanks @arunoda

@mycarrysun
Copy link

mycarrysun commented Mar 6, 2020

@arunoda sorry to reopen such an old thread but the docs aren't clear on what you need to do to set configType to DEVELOPMENT

Can you show an example of how one might set that variable and return it with the config?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants