28 lines
682 B
TypeScript
28 lines
682 B
TypeScript
import { defineConfig } from 'vite'
|
|
import solidPlugin from 'vite-plugin-solid'
|
|
import ssrPlugin from 'vite-plugin-ssr/plugin'
|
|
import sassDts from 'vite-plugin-sass-dts'
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
return {
|
|
envPrefix: 'PUBLIC_',
|
|
plugins: [solidPlugin({ ssr: true }), ssrPlugin({ includeAssetsImportedByServer: true }), sassDts()],
|
|
server: {
|
|
port: 3000
|
|
},
|
|
css: {
|
|
devSourcemap: true,
|
|
preprocessorOptions: {
|
|
scss: { additionalData: '@import "src/styles/imports";\n' }
|
|
}
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
external: []
|
|
},
|
|
chunkSizeWarningLimit: 1024,
|
|
target: 'esnext'
|
|
}
|
|
}
|
|
})
|