Webpack 4 support?
See original GitHub issueHi there,
i’m currently upgrading to webpack 4 and i’m using the static-site-generator-webpack-plugin for my build. It currently errors with the following output:
ERROR in SyntaxError: Unexpected token .
at module.exports (/Users/anon/gitrepos/myproject/node_modules/eval/eval.js:68:18)
at /Users/anon/gitrepos/myproject/node_modules/static-site-generator-webpack-plugin/index.js:42:22
I’m not really sure if it has anything to do with your plugin, but the stacktrace points to eval, one dependency of this plugin.
Maybe it has to do something with the way webpack 4 handles module.exports?
Any help would be appreciated 😃
Issue Analytics
- State:
- Created 6 years ago
- Reactions:9
- Comments:9 (1 by maintainers)
Top Results From Across the Web
To v5 from v4 - webpack
This guide aims to help you migrating to webpack 5 when using webpack directly ... it's recommended to update to the latest version...
Read more >Upgrading Webpack 4 → 5 | Square Corner Blog
However, it only supported up to Webpack 4 and the project had been deprecated with no alternative recommendations.
Read more >Webpack 4.0 Release: What's New? - Auth0
For this reason, Webpack 4 now supports WebAssembly out of the box. In Webpack 4, you can import and export any local WebAssembly...
Read more >A Beginner's Guide to Webpack 4. In IT world, change is that ...
js'); console.log('App Version:', config.version);. The browser doesn't support require() , so ...
Read more >Webpack 4 | Mobify DevCenter
Upgrading to webpack 4 can significantly improve a project's build time. ... Supported browser list is provided within package.json. - autoprefixer().
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

@Mydayyy You can use the package directly from my pull request temporarily, it’ll stay available.
For what it’s worth, I believe there is a problem when using this with the new mini-css-extract-plugin.
It seems to assume that the main bundle to evaluate in each chunk will be the first entry in the array where there are multiple files per chunk, as there would be using that plugin. Unfortunately, this isn’t the case, as the output is of the form
["chunkName.css", "chunkName.js"], which leaves the static-site-generator plugin trying to evaluate the CSS.Would a simple
Array.findto pull out the javascript filename in this case be a satisfactory fix? Happy to PR if so.