Added vite build
This commit is contained in:
parent
1eee28ad37
commit
c49f93572e
2
.clabot
2
.clabot
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"contributors": ["azukaar", "jwr1", "Jogai", "InterN0te", "catmandx", "revam"],
|
||||
"contributors": ["azukaar", "jwr1", "Jogai", "InterN0te", "catmandx", "revam", "Kawanaao"],
|
||||
"message": "We require contributors to sign our [Contributor License Agreement](https://github.com/azukaar/Cosmos-Server/blob/master/cla.md). In order for us to review and merge your code, add yourself to the .clabot file as contributor, as a way of signing the CLA."
|
||||
}
|
||||
|
|
20
vite.config.js
Normal file
20
vite.config.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
root: 'client',
|
||||
build: {
|
||||
outDir: '../static',
|
||||
},
|
||||
server: {
|
||||
proxy: {
|
||||
'/cosmos/api': {
|
||||
target: 'https://localhost:8443',
|
||||
secure: false,
|
||||
ws: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
|
@ -71,14 +71,22 @@ module.exports = {
|
|||
new CssMinimizerPlugin(),
|
||||
new TerserPlugin({
|
||||
minify: TerserPlugin.swcMinify,
|
||||
parallel: true,
|
||||
extractComments: "all",
|
||||
terserOptions: {
|
||||
mangle: true,
|
||||
compress: true,
|
||||
sourceMap: false,
|
||||
}
|
||||
})
|
||||
}),
|
||||
new TerserPlugin({
|
||||
minify: TerserPlugin.uglifyJsMinify
|
||||
}),
|
||||
new TerserPlugin({
|
||||
minify: TerserPlugin.esbuildMinify
|
||||
}),
|
||||
new TerserPlugin({
|
||||
minify: TerserPlugin.terserMinify
|
||||
}),
|
||||
|
||||
]
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue