|
@@ -1,22 +1,22 @@
|
|
|
import { defineConfig } from 'vite'
|
|
|
import vue from '@vitejs/plugin-vue'
|
|
|
-import Components from "unplugin-vue-components/vite";
|
|
|
-import { AntDesignVueResolver } from "unplugin-vue-components/resolvers";
|
|
|
|
|
|
-const port = process.argv.includes('--port')
|
|
|
- ? process.argv[process.argv.indexOf('--port') + 1]
|
|
|
- : 3000;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+const port = process.env.PORT ? parseInt(process.env.PORT) : 3000;
|
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
- plugins: [vue(),Components({
|
|
|
- resolvers: [AntDesignVueResolver({ importStyle: false })],
|
|
|
- }),],
|
|
|
-
|
|
|
- base: `/prototype/${port}/`,
|
|
|
+ plugins: [vue()],
|
|
|
+ base: `/ide/proxy/${port}/`,
|
|
|
+
|
|
|
+
|
|
|
server: {
|
|
|
host: '0.0.0.0',
|
|
|
- port: Number(port),
|
|
|
+
|
|
|
+ port: port,
|
|
|
strictPort: true,
|
|
|
watch: {
|
|
|
usePolling: true
|