prettier / prettier-browser-extension

Prettier Browser Extension
https://chrome.google.com/webstore/detail/prettier/fbcfnmplppajblbmdehballiekfgdkhp
MIT License
200 stars 18 forks source link

Fix loading Chrome extension from production build #337

Closed nickserv closed 4 years ago

nickserv commented 4 years ago

328 has fixed the development build in Chrome (tracked in #203), but it seems like it also broke the production build (as we still need the custom terser options for Prettier 2).

@sibiraj-s @kaicataldo Sorry I didn't notice this until after merging #328, but it's still helpful for fixing the development build.

nickserv commented 4 years ago

In retrospect I think it would be a good idea for us to have both builds end to end tested in CI. I tried to use web-ext run --source-dir extension/chrome --target chromium and it does show a popup with the error, but unfortunately doesn't change the status code so we can fail the build. Would appreciate help figuring this out.

Edit: In progress

fisker commented 4 years ago

@nickmccurdy

Does this mean this PR https://github.com/prettier/prettier/pull/8534 in Prettier is not good enough? Prettier already add ascii_only: true for all files now, here, this is merged last week.

You probably should keep the ascii_only: true, just let you guys know about it.

nickserv commented 3 years ago

I'm not sure, Prettier 2.1.2 has the same issue and it seems like this fix hasn't been released yet.