ezolenko / rollup-plugin-typescript2

Rollup plugin for typescript with compiler errors.
MIT License
819 stars 71 forks source link

vite 5.1.1 `error during build` #468

Closed nestle49 closed 6 months ago

nestle49 commented 6 months ago
vite v5.1.1 building for production...
✓ 0 modules transformed.
error during build:

    at Object._object (/Users/developer/PhpstormProjects/foodsoul-kit/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:27290:18)
    at Object.dispatch (/Users/developer/PhpstormProjects/foodsoul-kit/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:27257:31)
    at /Users/developer/PhpstormProjects/foodsoul-kit/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:27318:19
    at Array.forEach (<anonymous>)
    at Object._object (/Users/developer/PhpstormProjects/foodsoul-kit/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:27314:22)
    at Object.dispatch (/Users/developer/PhpstormProjects/foodsoul-kit/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:27257:31)
    at /Users/developer/PhpstormProjects/foodsoul-kit/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:27318:19
    at Array.forEach (<anonymous>)
    at Object._object (/Users/developer/PhpstormProjects/foodsoul-kit/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:27314:22)
    at Object.dispatch (/Users/developer/PhpstormProjects/foodsoul-kit/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:27257:31)
agilgur5 commented 6 months ago

Do not remove the issue template, it is there for a reason. An error stack trace with 0 context is not actionable.

nestle49 commented 6 months ago

I get this error after upgrade vue version from 3.4.15 (needed 3.4.16 or later)

Related issue (with minimal package and config, I can't reproduce project) https://github.com/vuejs/core/issues/10300

agilgur5 commented 6 months ago

I get this error after upgrade vue version from 3.4.15 (needed 3.4.16 or later)

That sounds like an issue in Vue then, not rpt2.

Related issue (with minimal package and config, I can't reproduce project) vuejs/core#10300

The config there is pretty far from minimal, and is a Vite config not a Rollup config. Notably, it does not seem to run rpt2 before esbuild either, which can cause a variety of issues as rpt2 is operating on untyped JS at that point. There is also no source code provided, only config.

Note that maintainers there said something very similar as well, in much shorter form and despite the significantly more details you provided there than here.

nestle49 commented 6 months ago

I get this error after upgrade vue version from 3.4.15 (needed 3.4.16 or later)

That sounds like an issue in Vue then, not rpt2.

Related issue (with minimal package and config, I can't reproduce project) vuejs/core#10300

The config there is pretty far from minimal, and is a Vite config not a Rollup config. Notably, it does not seem to run rpt2 before esbuild either, which can cause a variety of issues as rpt2 is operating on untyped JS at that point. There is also no source code provided, only config.

Note that maintainers there said something very similar as well, in much shorter form and despite the significantly more details you provided there than here.

Thanks, yes I think that vue problem

I created reproduction https://github.com/nestle49/minimalReproduction And I updated vue issue

agilgur5 commented 6 months ago

I created reproduction https://github.com/nestle49/minimalReproduction

Again, this is pretty far from minimal, and still has all the Vite/esbuild issues I mentioned above as well

nestle49 commented 6 months ago

Upstream problem answered in vue, if you're interested