iansinnott / iansinnott/react-static-webpack-plugin
Update to React-Router v4
- Dominant language
- JavaScript
- Stars
- 155
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
Currently, any `example` that uses react-router updated to v4 will break. I'm getting this error:
```
Unhandled rejection Error: Compilation completed with undefined assets. This likely means
react-static-webpack-plugin had trouble compiling one of the entry
points specified in options. To get more detail, try running again
but prefix your build command with:
DEBUG=react-static-webpack-plugin*
That will enable debug logging and output more detailed information.
at \node_modules\react-static-webpack-plugin\dist\index.js:189:15
```
Here are my files:
webpack.config.js
```javascript
module.exports = {
...
plugins: [
new ReactStaticPlugin({
routes: path.resolve(APP_DIR, 'routes.js'),
template: path.resolve(APP_DIR, 'template.js')
})
]
};
```
src/routes.js
```javascript
import { Route } from 'react-router-dom';
import Home from './routes/Home';
// Not sure about if this export is needed?
export const routes = ;
export default routes;
```
src/template.js
```javascript
import React from 'react';
const markup = ({ title = '', body }) => {
const titleSuffix = title === '' ? '' : ' - Hugmanrique';
{`${title}${titleSuffix}`}
</body>
</html>;
};
export default markup;
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.