Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nitro bundling does not seem to convert the typescript decorator. #274

Closed
issue-up bot opened this issue Jun 9, 2022 · 0 comments
Closed

Nitro bundling does not seem to convert the typescript decorator. #274

issue-up bot opened this issue Jun 9, 2022 · 0 comments

Comments

@issue-up
Copy link

issue-up bot commented Jun 9, 2022

   Forwarded from downstream issue:


Environment

  • Operating System: Windows_NT
  • Node Version: v16.15.0
  • Nuxt Version: 3.0.0-rc.3
  • Package Manager: npm@8.3.0
  • Builder: vite
  • User Config: typescript, app, css, build, runtimeConfig, vite
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://codesandbox.io/s/sleepy-mestorf-hh7edv?file=/server/utils/sequelize.ts

Describe the bug

I apologize for my poor English and use a translator.

If the source code includes a typescript decorator, the bundling of rollup does not end.
I think it's the same issue as the nuxt/nuxt#14062 post.

Here are the results of the my nuxi dev:

Vite client warmed up in 9811ms 00:02:29
Vite server warmed up in 430ms 00:02:31
Vite server built in 12457ms

I checked exactly where it stopped.

And the esbuild rollup plugin used in the getRollupConfig function in the node_modules/nitropack/dist/chunks/prerender.mjs file does not seem to process files that use typescript decorators.
And I found out that the autoImport plugin excluded files that are using decorators from the processing list.

One weird thing is, after the first nuxt app was created, it worked.
This issue occurred after deleting the node_modules folder and reinstalling all packages.

I deleted the file node_modules, .vite, .nuxt, package-lock.json, and deleted the cache using the npm clean verify command. Nevertheless, the problem has not been solved.

Also, after deleting the node_modules folder and reinstalling the package, an explicit installation of the @nuxt/vite-builder package was required. This was not required immediately after the app was created with the nuxi command.

I've prepared minimal reproduction, but I don't know how it'll work.

Additional context

No response

Logs

No response

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

No branches or pull requests

1 participant