[v6] - Routing - webpack alias doesnt seem to work when building the HTML
See original GitHub issuebuilding the assets with webpack works fine, but when the build process tries to build the HTML pages i get the following error:
Error: Failed exporting HTML for URL 404 (src/pages/404.jsx): Could not load React-Static routes! Please double check your webpack configuration for consistency and restart/rebuil d your app. If this error persists, it is likely a webpack resolve.alias problem and you should file an issue at "https://github.com/nozzle/react-static/issues" ASAP.
- routes.js:2 module.exports
[app]/[react-static]/routes.js:2:9
- react-dom-server.node.production.min.js:28 d
[app]/[react-dom]/cjs/react-dom-server.node.production.min.js:28:492
- react-dom-server.node.production.min.js:30 ua
[app]/[react-dom]/cjs/react-dom-server.node.production.min.js:30:494
- react-dom-server.node.production.min.js:35 a.render
[app]/[react-dom]/cjs/react-dom-server.node.production.min.js:35:48
- react-dom-server.node.production.min.js:34 a.read
[app]/[react-dom]/cjs/react-dom-server.node.production.min.js:34:288
- react-dom-server.node.production.min.js:45 renderToString
[app]/[react-dom]/cjs/react-dom-server.node.production.min.js:45:6
- exportRoute.js:131 renderToStringAndExtract
[app]/[react-static]/src/static/exportRoute.js:131:21
i was unable to find the correct spot of this bug, the development server works fine…
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:19 (14 by maintainers)
Top Results From Across the Web
Routing not working as expected in React app using react ...
It seems modifying my webpack config for dev worked. devServer: { port: 4000, hot: true, //enable webpack hot module replacement open: true, ...
Read more >Resolve | webpack
you can use the alias: import Utility from 'Utilities/utility';. A trailing $ can also be added to the given object's keys to signify...
Read more >[Solved]-Webpack Aliases in Node JS Server code-Reactjs
Try to use NODE_PATH . Node will always look for a module in this path during require calls. It allows to short cut...
Read more >React dynamic imports and route-centric code splitting guide
Learn how to speed up your React apps using dynamic imports, React.lazy(), React.Suspense, React Router, and Loadable Components.
Read more >Common Routing Tasks - Angular
To use the Angular router, an application needs to have at least two components so that it can navigate from one to the...
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
Well shoot. I’ll double back and try with a clean install.
On Sat, Oct 6, 2018 at 2:29 AM Bartłomiej Maciejiczek < notifications@github.com> wrote:
works now