Bundle Error: 'import' and 'export' may appear only with 'sourceType: module'

Hi, I’m using block sdk to build a custom app. But I meet an error after I install an es6 modules( @antv/x6 )

Bundle Error: 'import' and 'export' may appear only with 'sourceType: module'

I tried to add a .babelrc file to add prset-env but don’t work. what should i do to solve this problem?

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.