Skip to content
This repository has been archived by the owner on Oct 13, 2022. It is now read-only.

Closure compiler support #75

Open
Rich-Harris opened this issue Sep 2, 2018 · 0 comments
Open

Closure compiler support #75

Rich-Harris opened this issue Sep 2, 2018 · 0 comments

Comments

@Rich-Harris
Copy link
Member

Moving this issue by @maxmilton from sapper-template-rollup, since I'm about to delete it in favour of the rollup branch on this repo:


After an epic debugging session this morning trying to get Closure Compiler working with this project I ran into some showstoppers.

The service worker will compile with only small changes, however, compiling the other JS bundles is another story. Due to the use of dynamic import, import(), the compiler ran into issues.

@ampproject/rollup-plugin-closure-compiler can't parse import() because it's using acorn which doesn't support it out of the box. I've created an issue over there suggesting they use acorn-dynamic-import to add support: ampproject/rollup-plugin-closure-compiler#48.

Even after I was able to implement a workaround with @ampproject/rollup-plugin-closure-compiler locally, I discovered Closure Compiler itself can't parse import() at all and throws an error preventing the build. Opened an issue for that too: google/closure-compiler#2770.

So as it stands, both of these are blockers preventing us from using Closure Compiler right now.


FYI the progress I made is in https://github.com/MaxMilton/sapper-template-rollup/tree/feat/use-closure-compiler.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant