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

feat(webpack, vite): default to .js extension for client#6505

Merged
pi0 merged 1 commit intomainfrom
fix/client-js-filenames
Aug 12, 2022
Merged

feat(webpack, vite): default to .js extension for client#6505
pi0 merged 1 commit intomainfrom
fix/client-js-filenames

Conversation

@danielroe
Copy link
Member

🔗 Linked issue

#6232 (comment)
https://github.com/nuxt/framework/discussions/6168

❓ 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

Now that we have updated vue-bundle-renderer, we can output.js files on client-side, for better support with CDN/web servers.

This PR also allows users to configure their output filenames on vite. (Previously it always overrode them.)

import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
  vite: {
    build: {
      rollupOptions: {
        output: {
          chunkFileNames: '_nuxt/[hash].mjs'
        }
      }
    }
  }
})

📝 Checklist

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

@danielroe danielroe added bug Something isn't working vite webpack 🍰 p2-nice-to-have Priority 2: nothing is broken but it's worth addressing labels Aug 11, 2022
@danielroe danielroe requested a review from pi0 August 11, 2022 08:24
@danielroe danielroe self-assigned this Aug 11, 2022
@netlify
Copy link

netlify bot commented Aug 11, 2022

Deploy Preview for nuxt3-docs canceled.

Name Link
🔨 Latest commit b2b7b00
🔍 Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/62f4bcb0526d530008665056

@pi0 pi0 merged commit 0a513a5 into main Aug 12, 2022
@pi0 pi0 deleted the fix/client-js-filenames branch August 12, 2022 14:16
This was referenced Aug 26, 2022
@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 🍰 p2-nice-to-have Priority 2: nothing is broken but it's worth addressing vite webpack

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants