0

I have an ES6 web application using multiple libraries (eg BabylonJs, React, Material-UI, Material-Tables).

Transpiling this application without tree shaking works (and even the app does).

But transpiling it with --experimental-scope-hoisting produces:

 'import' and 'export' may appear only with 'sourceType: "module"' (1:0)

How do I get this resolved?

Ruediger Jungbeck
  • 2,836
  • 5
  • 36
  • 59
  • Does this [answer](https://stackoverflow.com/questions/40029113/syntaxerror-import-and-export-may-appear-only-with-sourcetype-module-g) help? – tanmoy Jun 01 '21 at 09:22

1 Answers1

0

Upgrading to Parcel2 solved my problem.

In a second step I changed to esbuild which dramatically reduced the build time.

Ruediger Jungbeck
  • 2,836
  • 5
  • 36
  • 59