mirror of
https://github.com/hanzoai/vite.git
synced 2026-10-30 19:36:16 +00:00
30 lines
651 B
JavaScript
30 lines
651 B
JavaScript
import { defineConfig } from 'vite'
|
|
import { composeVisitors } from 'lightningcss'
|
|
import baseConfig from './vite.config.js'
|
|
import {
|
|
nestedLikePlugin,
|
|
testDirDep,
|
|
testInjectUrl,
|
|
testSourceInput,
|
|
} from './lightningcss-plugins'
|
|
|
|
export default defineConfig({
|
|
...baseConfig,
|
|
css: {
|
|
...baseConfig.css,
|
|
transformer: 'lightningcss',
|
|
lightningcss: {
|
|
cssModules: {
|
|
pattern: '[name]__[local]___[hash]',
|
|
},
|
|
visitor: composeVisitors([
|
|
nestedLikePlugin(),
|
|
testDirDep(),
|
|
testSourceInput(),
|
|
testInjectUrl(),
|
|
]),
|
|
},
|
|
},
|
|
cacheDir: 'node_modules/.vite-no-css-minify',
|
|
})
|