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

@vitejs/plugin-legacy why not extract css into a file #14225

Closed
4 tasks done
silverWolf818 opened this issue Aug 28, 2023 · 1 comment
Closed
4 tasks done

@vitejs/plugin-legacy why not extract css into a file #14225

silverWolf818 opened this issue Aug 28, 2023 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@silverWolf818
Copy link

Description

I use @vitejs/plugin-legacy to build

build result css all inline in js

I want to extract css into a file

import { defineConfig } from 'vite'
import { resolve } from 'path'
import react from '@vitejs/plugin-react'
import legacy from '@vitejs/plugin-legacy'
export default defineConfig({
  plugins: [
    react(),
    legacy({
      targets: ['defaults', 'not IE 11'],
      renderModernChunks: false,
    }),
  ],
  build: {
    minify: 'terser',
    manifest: true,
    cssCodeSplit: true,
    rollupOptions: {
      input: {
        one: resolve(__dirname, 'one/index.tsx'),
        tow: resolve(__dirname, 'tow/index.tsx'),
      },
    },
  },
})

Suggested solution

I want to extract css into a file

Alternative

No response

Additional context

No response

Validations

@sapphi-red
Copy link
Member

Duplicate of #2062

@sapphi-red sapphi-red marked this as a duplicate of #2062 Aug 29, 2023
@sapphi-red sapphi-red closed this as not planned Won't fix, can't repro, duplicate, stale Aug 29, 2023
@sapphi-red sapphi-red added duplicate This issue or pull request already exists and removed enhancement: pending triage labels Aug 29, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Sep 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants