mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-14 10:09:31 -07:00
* refactor: migrate part of the sass compilation to vite now `bundled` option is deprecated * fix: update build script * chore: add a “type” field to the package.json file to resolve Vite’s complaints about CommonJS modules.
31 lines
617 B
TypeScript
31 lines
617 B
TypeScript
import { defineConfig } from 'vite'
|
|
import solidPlugin from 'vite-plugin-solid'
|
|
|
|
export default defineConfig({
|
|
plugins: [solidPlugin()],
|
|
build: {
|
|
outDir: './static/bundled',
|
|
watch: {
|
|
include: 'assets/**'
|
|
},
|
|
rollupOptions: {
|
|
input: './assets/ts/main.tsx',
|
|
output: {
|
|
format: 'es',
|
|
entryFileNames: 'js/[name].js',
|
|
chunkFileNames: 'js/[hash:6].js',
|
|
assetFileNames: '[ext]/[name].[ext]',
|
|
compact: true
|
|
}
|
|
},
|
|
terserOptions: {
|
|
compress: {
|
|
passes: 3
|
|
},
|
|
output: {
|
|
comments: false
|
|
}
|
|
}
|
|
}
|
|
})
|