Closed francescocaveglia closed 8 months ago
This is an issue in Webpack v4, without any real solution for the time being: https://github.com/webpack/webpack/issues/10227
Essentially, as you've raised the browserlist targets so that optional chaining isn't transpiled out, Webpack (or rather, Acorn) ends up attempting to parse them which it cannot.
Closing, fixed in v4
What is the current behaviour? Adding a broswerslist config like this causes errors on optional chaining or nullish coalescing syntax
Steps to Reproduce Steps to reproduce the behavior:
npx preact-cli create typescript <project>
npm run build