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

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

Merged
merged 1 commit into from Aug 12, 2022

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.

None yet

2 participants