-
Notifications
You must be signed in to change notification settings - Fork 57
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
docs: add mjs config details to installation docs #402
Conversation
Signed-off-by: Eric Dobbertin <eric@dairystatedesigns.com>
🚀 Preview deployed Built with commit 67a975c https://deploy-preview-402--stoic-hodgkin-c0179e.netlify.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small format change!
|
||
Webpack 4 tries to use .mjs files, which are EcmaScript modules, if a package provides them. However, there is still mixed support for EcmaScript modules and when your app or a package mixes NPM packages with CommonJS and EcmaScript exports, errors can happen. If you see an error similar to `Can't import the named export 'Component' from non EcmaScript module` when building or starting your Webpack app, the solution is to add the following in your Webpack config `module.rules` array: | ||
|
||
```js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
React Styleguidist will try to render any ```js code. So it ends up looking like this:
Use jsx static
or jsx noeditor
so the editor doesn't show up: https://react-styleguidist.js.org/docs/documenting.html#usage-examples-and-readme-files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks I forgot about this
Signed-off-by: Eric Dobbertin <eric@dairystatedesigns.com>
Signed-off-by: Eric Dobbertin <eric@dairystatedesigns.com>
🎉 This PR is included in version 0.64.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I have and issue when I run npm start I get this issue |
Resolves #399
Impact: minor
Type: docs
Updated the Installing and Importing article to explain how to avoid EcmaScript module errors with Webpack (NextJS / create-react-app).