How to set compile option to never in polymer serve?

39 Views Asked by At

When setting option compile to never in command polymer serve (polymer serve --compile never) I expect that it doesn't transpile my ES6 code to ES5 but it compiles for Firefox and not for Chrome so I believe polymer serve is still using auto as compile option.

  • Firefox: imports rewritten as define([])
  • Chrome: imports kept untouched (import {} from)

polymer-cli v1.9.8

EDIT:

All imports are static

1

There are 1 best solutions below

1
André Silva On

Are you talking about static ou dynamic imports?

Because since Firefox does not currently support dynamic import(), polymer serve has to convert them because otherwise the application wouldn't run at all. Even worse than not supporting them, Firefox throws a SyntaxError when they parse JavaScript files and see the aforementioned imports.