prepack icon indicating copy to clipboard operation
prepack copied to clipboard

ES6 module

Open zaoqi opened this issue 5 years ago • 2 comments

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.

zaoqi avatar May 03 '19 08:05 zaoqi

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...

Yegorich555 avatar Jan 02 '20 16:01 Yegorich555

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

adeelavancerasolution avatar Aug 12 '21 07:08 adeelavancerasolution