Support for the experimental syntax 'importMeta' isn't currently enabled

Hi ,

In my Javascript there is call to the below function . I am getting the error Support for the experimental syntax ‘importMeta’ isn’t currently enabled

static get importMeta() { return import.meta; }

If i run through polymer serve I am not getting this error.

Any suggestions ?

Hello, webpack currently doesn’t support import.meta https://github.com/webpack/webpack/issues/6719

There are unofficial plugins that attempt to solve this problem like [this one]
(https://github.com/cfware/babel-plugin-bundled-import-meta) but configuring them to work with Flow might be complex.

I assume you are using a third party component that contains this code. If so, it would be nice to identify what component it is, and what assets does it need to load (that’s typically the purpose of importMeta in Polymer components).

Then you could try fork that third party component and load assets it needs in a different way.