Now remove vuepress from package.json, run yarn install, then yarn build --modern and it will work correctly again (it will build as an arrow function).
What is expected?
The modern build should work fine, and contain =>
The -legacy and regular bundle should be different sizes, and the regular one should contain arrow functions.
What is actually happening?
Files are almost identical apart from the sourcemap.
Bug report
Adding vuepress to an existing project using this guide https://vuepress.vuejs.org/guide/getting-started.html#inside-an-existing-project breaks the existing project's modern mode build.
Version 0.14.1
Steps to reproduce
https://github.com/archSeer/tsmodern
yarn build --modern
Search for
arrowTest
inside app.*.js (not .map)Now remove
vuepress
from package.json, runyarn install
, thenyarn build --modern
and it will work correctly again (it will build as an arrow function).What is expected?
The modern build should work fine, and contain
=>
The -legacy and regular bundle should be different sizes, and the regular one should contain arrow functions.
What is actually happening?
Files are almost identical apart from the sourcemap.
I also can't find the arrow function used anywhere in the modern bundle:
Other relevant information