Skip to content

plugins applies to worker only for dev and requires worker.plugins for build #8520

@zhmushan

Description

Describe the bug

Only by adding this plugin to rollup as well will it pass compilation.

import plugin from './plugin.js';

export default {
  plugins: [plugin()],
  build: {
    rollupOptions: {
      // plugins: [plugin()],
    },
  },
};

More details can be found in the reproduction. trust me, it is a minimal and will not waste too much of your time.

Reproduction

https://stackblitz.com/edit/vitejs-vite-mojc3s?file=vite.config.js

System Info

n/a

Used Package Manager

pnpm

Logs

No response

Validations

Metadata

Assignees

No one assigned

    Labels

    feat: web workersinconsistencyInconsistency between dev & buildp2-edge-caseBug, but has workaround or limited in scope (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions