Webpack error on static build
See original GitHub issueDescribe the bug
Webpack loader error when building a static site using build-storybook,
with default setup:
./stories/index.stories.js 9:55
Module parse failed: Unexpected token (9:55)
You may need an appropriate loader to handle this file type.
| import { Button, Welcome } from '@storybook/react/demo';
I have tried tweaking webpack.config.js in .storybook, but can’t figure out the correct settings that will get this to build correctly. Thanks for any assistance with this.
To Reproduce Steps to reproduce the behavior:
- Fresh repo (cloned from react-boilerplate, as per quick start instructions)
npx -p @storybook/cli sb init
npm run build-storybook
Expected behavior
Storybook static site builds correctly.
npm run storybook
works fine locally, but cannot build a static site.
Attempting to deploy to gh-pages using storybook-deployer
has the same error (deploys successfully, but storybook is broken).
System:
- OS: Windows 7
- NodeJS 10.15.0
- Storybook 4.1.11
- React 16.6.0
- Webpack 4.23.1
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
react-static : Error while building the static site for production
I am doing a proof of concept for the static site building by react-static. I just have some basic setup mostly defaults (basic...
Read more >Error in webpack during build but not dev: "ERROR in static ...
It occurred when I ran npm run build , but everything worked fine using the webpack dev server ( npm run dev )....
Read more >React-Static : Error while building the static site for production
I am doing a proof of concept for the static site building by react-static. I just have some basic setup mostly defaults (basic...
Read more >DevServer - webpack
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >Build error on static deployment where previously it worked
Hi I'm seeing a new build error on two static websites that were previously fine. A partial of the the build log and...
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 Free
Top 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
Hey there, it’s me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!
same here…