Skip to content

fix(nuxt): use buildAssetsDir in nuxt-teleport-island-component#27469

Merged
danielroe merged 2 commits intonuxt:mainfrom
andresilva-cc:fix/nuxt-teleport-island-component-hardcoded-build-dir
Jun 7, 2024
Merged

fix(nuxt): use buildAssetsDir in nuxt-teleport-island-component#27469
danielroe merged 2 commits intonuxt:mainfrom
andresilva-cc:fix/nuxt-teleport-island-component-hardcoded-build-dir

Conversation

@andresilva-cc
Copy link
Copy Markdown
Contributor

🔗 Linked issue

📚 Description

It's common in some scenarios, for example when multiple projects are running on the same domain, to define a different value for app.buildAssetsDir. When using componentIslands.selectiveClient in development, the nuxt-teleport-island-component uses a hardcoded value (/_nuxt/).

This PR changes the component to use the buildAssetsDir config. If the config is not set, it'll still use /_nuxt/ as before, because that's the default value of the config.

@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@andresilva-cc
Copy link
Copy Markdown
Contributor Author

I opened this as a draft for 2 reasons:

  1. Not sure if it's recommended to get buildAssetsDir from nuxtApp.$config
  2. The test test/bundle.test.ts > minimal nuxt application > default server bundle size (inlined vue modules) is failing because the size was increased to 76.2k. Not sure if this is something I need to update or if it gets updated automatically.

@danielroe danielroe requested a review from huang-julien June 7, 2024 10:34
@andresilva-cc andresilva-cc marked this pull request as ready for review June 7, 2024 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants