static-site-generator-webpack-plugin: Export from "app" must be a function that returns an HTML string
Here’s a repo that reproduces the issue: https://github.com/sidjain26/static-react-issue
Note: This is using webpack v2.1, babel v6, react v15, react-router v2.4
Run
npm i
npm run build
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 3
- Comments: 21 (9 by maintainers)
I saw your comment and pull request. In order to leverage tree shaking one needs to disable module syntax transformation.
More info: https://github.com/gajus/babel-preset-es2015-webpack
@ahoereth Oh nice, I missed your comment while going through this. Also, that is exactly what I did in the original PR but I modified it to just check for
default, since if__esModuleis own property then, so will bedefault. So didn’t make sense to check for both.