Export from "app" must be a function that returns an HTML string
See original GitHub issueHere’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
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:21 (9 by maintainers)
Top Results From Across the Web
Export from "app" must be a function that returns an HTML ...
I am trying to use this library in combination with react router. my webpack plugins has: entry: { app: ['src/app.js'] }, plugins: [...
Read more >Laravel Export : Function name must be a string - Stack Overflow
Having a problem with this code <?php namespace App\Exports ...
Read more >export - JavaScript - MDN Web Docs
The export declaration is used to export values from a JavaScript module. Exported values can then be imported into other programs with the ......
Read more >module.exports – How to Export in Node.js and JavaScript
In this article, I will show you how to share functions and values by exporting and importing modules in Node.js.
Read more >Understanding Modules and Import and Export Statements in ...
As the importance of JavaScript in web development grows, there is a bigger need to use third-party code for common tasks, to break...
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

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.