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

[@vite/legacy] No worker file generate when using legacy to run vite build. #19132

Closed
7 tasks done
Flcwl opened this issue Jan 4, 2025 · 1 comment
Closed
7 tasks done
Labels
duplicate This issue or pull request already exists

Comments

@Flcwl
Copy link

Flcwl commented Jan 4, 2025

Describe the bug

I want to use the worker in old browser by @vite/legacy. But has no worker file generate when running vite build it.
image

import vue from '@vitejs/plugin-vue';
import legacy from '@vitejs/plugin-legacy';
import { resolve } from 'path';
import { defineConfig } from 'vite';

export default defineConfig({
  plugins: [
    vue(),
    legacy({
      renderModernChunks: false,
      renderLegacyChunks: true,
    }),
  ],
  build: {
    reportCompressedSize: false,
  },
  worker: {
    format: 'iife',
  },
  resolve: {
    alias: {
      '@': resolve(__dirname, './src'),
    },
  },
});

Reproduction

https://stackblitz.com/edit/node-la3to4sk?file=vite.config.ts

Steps to reproduce

Run npm install followed by npm run build

System Info

"devDependencies": {
    "@vitejs/plugin-legacy": "^6.0.0",
    "@vitejs/plugin-vue": "^5.2.1",
    "typescript": "^5.7.2",
    "vite": "^6.0.7"
  },

Used Package Manager

npm

Logs

No response

Validations

@sapphi-red
Copy link
Member

Duplicate of #18558

@sapphi-red sapphi-red marked this as a duplicate of #18558 Jan 7, 2025
@sapphi-red sapphi-red closed this as not planned Won't fix, can't repro, duplicate, stale Jan 7, 2025
@sapphi-red sapphi-red added duplicate This issue or pull request already exists and removed pending triage labels Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants