Quantcast
Channel: Active questions tagged config - Stack Overflow
Viewing all articles
Browse latest Browse all 5060

ESM import on webpackConfig

$
0
0

I'm building a webpack app and I'm interested in use ESM through the entire app, meaning that build the webpack.config file with ESM imports.

I now this is possible using Babel, but this was before npm added the "type": "module" supporting now ESM imports without babel... I already tried it with Express and it worked but with Webpack I get this:

> ...proyectDirectory/node_modules/webpack-cli/bin/cli.js:93> require() of ES modules is not supported.

So I was wondering if there is a version of webpack-cli that use import instead of require


Viewing all articles
Browse latest Browse all 5060

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>