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

Dynamic components don't render in bundled build #372

Closed
husayt opened this issue Jun 8, 2020 · 4 comments
Closed

Dynamic components don't render in bundled build #372

husayt opened this issue Jun 8, 2020 · 4 comments

Comments

@husayt
Copy link
Contributor

husayt commented Jun 8, 2020

Describe the bug

After adding aliases in vite 2.0.6 issue #368 is partially resolved, but only in dev. Static version generated with yarn run build still doesn't render that component.

Reproduction

Reproduction Repo: https://github.com/husayt/vite-tailwind-starter

Reproduction step

With yarn dev you will see a button in the middle of the screen

However in static build that button is missing

yarn build
yarn servestatic

System Info

  • required vite version: 0.20.7
  • required Operating System: Windows 10
  • required Node version: 14.3
  • Optional:
    • npm/yarn version yarn 1.22.4
@yyx990803
Copy link
Member

Please provide a minimal repro only reproducing the error. I can't tell which part is relevant.

@husayt
Copy link
Contributor Author

husayt commented Jun 9, 2020

@yyx990803 check again, please. I have removed all the distracting stuff and only left App.vue where one can see exactly what happens.

@underfin
Copy link
Member

underfin commented Jun 9, 2020

You should put component code into .vue file.It will work for you.

Because the vue bundler which build sfc don‘t include template-compiler.It caused the template of component not complied.

@yyx990803
Copy link
Member

This is a bug in vue-next - we need to remove sideEffects: false from the main vue package because registering the runtime compiler is a side effect. Tracked in vuejs/core#1263

@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants