Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(nuxt3): directly emit document.template.mjs #4360

Merged
merged 3 commits into from
Apr 15, 2022
Merged

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented Apr 14, 2022

πŸ”— Linked issue

resolves nuxt/nuxt#13741

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

In development, there's a danger of breaking the nitro build when we write the document template. As we've split bridge implementation off separately, we can instead write it directly.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroe danielroe added bug Something isn't working nitro nuxt3 πŸ”¨ p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage labels Apr 14, 2022
@danielroe danielroe requested a review from pi0 April 14, 2022 14:19
@danielroe danielroe self-assigned this Apr 14, 2022
@netlify
Copy link

netlify bot commented Apr 14, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit dc85cf6
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/62584c60870b27000996e7a7

@danielroe danielroe marked this pull request as draft April 14, 2022 14:28
@@ -196,13 +195,16 @@ async function resolveHandlers (nuxt: Nuxt) {
async function writeDocumentTemplate (nuxt: Nuxt) {
// Compile html template
const src = resolve(nuxt.options.buildDir, 'views/app.template.html')
const dst = src.replace(/.html$/, '.mjs').replace('app.template.mjs', 'document.template.mjs')
const dst = resolve(nuxt.options.buildDir, 'views/document.template.mjs')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we splitted bridge implementation, I think now we could initially generate .mjs version from nuxt templates rather than copy and convert.

@danielroe danielroe marked this pull request as ready for review April 14, 2022 16:35
@danielroe danielroe changed the title fix(nuxt3): use vfs document template fix(nuxt3): emit a single document template Apr 14, 2022
@danielroe danielroe removed the nitro label Apr 14, 2022
@pi0 pi0 changed the title fix(nuxt3): emit a single document template fix(nuxt3): directly emit document.template.mjs Apr 15, 2022
@pi0 pi0 merged commit 14d9e8e into main Apr 15, 2022
@pi0 pi0 deleted the fix/vfs-document-template branch April 15, 2022 07:39
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3.x bug Something isn't working nuxt3 πŸ”¨ p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.nuxt/views/document.template.mjs' does not provide an export named 'default'
2 participants