You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The application is built in the shadow Dom but the css is added to the head.
How to add all css to shadow Dom?
In esbuild this is done by esbuild-css-modules-plugin, but I haven’t found how to do the same in vite
System Info
I have vite config
import react from '@vitejs/plugin-react';
import * as path from 'path';
import { defineConfig, splitVendorChunkPlugin } from 'vite';
import htmlPlugin from 'vite-plugin-html-config';
import { dependencies } from './package.json';
const exclVendors = ['react', 'react-router-dom', 'react-dom'];functionrenderChunks(deps: Record<string, string>) {
let chunks = {};
Object.keys(deps).forEach((key) => { if (exclVendors.includes(key))return;
chunks[key] = [key];
});
return chunks;
}
// https://vitejs.dev/config/
export default defineConfig({
server: {
port: 8082
},
envPrefix: 'APP_',
resolve: {
alias: [{ find: '@', replacement: path.resolve(__dirname, 'src') }],
},
plugins: [
react(),
htmlPlugin({ favicon: './src/assets/logo.svg' }),
splitVendorChunkPlugin(),
],
build: {
sourcemap: false,
rollupOptions: {
output: {
manualChunks: {
...renderChunks(dependencies),
},
},
},
},
});
I want create app in shadow Dom.
The application is built in the shadow Dom but the css is added to the head.
How to add all css to shadow Dom?
In esbuild this is done by esbuild-css-modules-plugin, but I haven’t found how to do the same in vite
### Used Package Manager
npm
### Logs
I have vite config
import react from '@vitejs/plugin-react';
import * as path from 'path';
import { defineConfig, splitVendorChunkPlugin } from 'vite';
import htmlPlugin from 'vite-plugin-html-config';
import { dependencies } from './package.json';
const exclVendors = ['react', 'react-router-dom', 'react-dom'];
function renderChunks(deps: Record<string, string>) {
let chunks = {};
Object.keys(deps).forEach((key) => {
if (exclVendors.includes(key)) return;
chunks[key] = [key];
});
return chunks;
}
I want create app in shadow Dom.
The application is built in the shadow Dom but the css is added to the head.
How to add all css to shadow Dom?
In esbuild this is done by esbuild-css-modules-plugin, but I haven’t found how to do the same in vite
The text was updated successfully, but these errors were encountered:
Describe the bug
I have vite config
I want create app in shadow Dom.
The application is built in the shadow Dom but the css is added to the head.
How to add all css to shadow Dom?
In esbuild this is done by esbuild-css-modules-plugin, but I haven’t found how to do the same in vite
Reproduction
http://
Steps to reproduce
I have vite config
I want create app in shadow Dom.
The application is built in the shadow Dom but the css is added to the head.
How to add all css to shadow Dom?
In esbuild this is done by esbuild-css-modules-plugin, but I haven’t found how to do the same in vite
System Info
I want create app in shadow Dom.
The application is built in the shadow Dom but the css is added to the head.
How to add all css to shadow Dom?
In esbuild this is done by esbuild-css-modules-plugin, but I haven’t found how to do the same in vite
import react from '@vitejs/plugin-react';
import * as path from 'path';
import { defineConfig, splitVendorChunkPlugin } from 'vite';
import htmlPlugin from 'vite-plugin-html-config';
import { dependencies } from './package.json';
const exclVendors = ['react', 'react-router-dom', 'react-dom'];
function renderChunks(deps: Record<string, string>) {
let chunks = {};
Object.keys(deps).forEach((key) => {
if (exclVendors.includes(key)) return;
chunks[key] = [key];
});
return chunks;
}
// https://vitejs.dev/config/
export default defineConfig({
server: {
port: 8082
},
envPrefix: 'APP_',
resolve: {
alias: [{ find: '@', replacement: path.resolve(__dirname, 'src') }],
},
plugins: [
react(),
htmlPlugin({ favicon: './src/assets/logo.svg' }),
splitVendorChunkPlugin(),
],
build: {
sourcemap: false,
rollupOptions: {
output: {
manualChunks: {
...renderChunks(dependencies),
},
},
},
},
});
The text was updated successfully, but these errors were encountered: