juanjoDiaz / streamparser-json

Streaming JSON parser in Javascript for Node.js and the browser
MIT License
138 stars 11 forks source link

Dist files are using `export * ...` fails to compile with webpack 4 #34

Closed zibra closed 6 days ago

zibra commented 1 year ago

Error from: @streamparser/json/dist/mjs/index.js 4:9

obraz

juanjoDiaz commented 1 year ago

Hi @zibra ,

There are plenty of people out there using this package with webpack. As the error says, it looks like your compiler is doing misconfigured somehow.

If you are using es6 modules, then it's expected that dist/mjs modules are used. If you are using commonjs modules, then it's expected that dist/cjs modules are used. I don't see any issue based on the info that you have provided.

defghy commented 11 months ago

webpack 4 not support "export * as..." syntax; webpack 5 support it https://stackoverflow.com/questions/61718768/how-can-i-export-as-namespace-in-babel https://stackoverflow.com/questions/74717884/webpack-cannot-compile-file-that-uses-export-as-something

defghy commented 11 months ago

if you use vue-cli-service, this is solution