SyntaxError: unknown: 'import' and 'export' may appear only with 'sourceType: "module"'
Closed this issue · 2 comments
Arttse commented
rollup
version 0.66.6
rollup-plugin-filesize
version 5.0.0
When build with output.format
= esm
throws an error:
[!] (filesize plugin) SyntaxError: unknown: 'import' and 'export' may appear only with 'sourceType: "module"'
Consider renaming the file to '.mjs', or setting sourceType:module or sourceType:unambiguous in your Babel config for this file.
With rollup-plugin-filesize
version 4.0.1
there is no such problem.
kylealwyn commented
Experiencing same issue. Fixed for now by downgrading to v4
ritz078 commented
should be fixed in 5.0.1