facebookarchive / prepack

A JavaScript bundle optimizer.
http://prepack.io
Other
14.22k stars 425 forks source link

ES6 module #2629

Open zaoqi opened 5 years ago

zaoqi commented 5 years ago
In input file lang.js(64:1) FatalError PP1004: Syntax error: 'import' and 'export' may appear only with 'sourceType: "module"' (64:0) (https://github.com/facebook/prepack/wiki/PP1004)

Prepack failed, reporting 1 fatal error.
Yegorich555 commented 4 years ago

Why is it issue? Your file should be converted from ES6 to NodeJs module and only after that prepacked. It can be done with webpack for example...

adeelavancerasolution commented 3 years ago

my entire backend is in module form so should I use webpack to convert it to commonJs? that would most likely be impossinble.