Skip to content

Commit

Permalink
Merge branch 'feature_firebase' of github.com:fan9704/MQTT-Frontend i…
Browse files Browse the repository at this point in the history
…nto feature_firebase
  • Loading branch information
fan9704 committed Jun 22, 2023
2 parents bb24190 + b77c2c4 commit 44d4137
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 30 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ dist-ssr
*.sw?

.env

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
"devDependencies": {
"@vitejs/plugin-vue": "^2.3.3",
"@vuetify/vite-plugin": "^1.0.0-alpha.0",
"https-localhost": "^4.7.0",
"vite": "^2.9.13",
"vite-plugin-pwa": "^0.12.2",
"vite-plugin-vuetify": "^1.0.2",
"vuetify-loader": "^1.9.2",
"https-localhost": "^4.7.0"
"vuetify-loader": "^1.9.2"
}
}
64 changes: 36 additions & 28 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
import { defineConfig } from 'vite'
import { defineConfig, loadEnv } from 'vite';
import vue from '@vitejs/plugin-vue'
import vuetify from '@vuetify/vite-plugin'
import { VitePWA } from 'vite-plugin-pwa'
import path from 'path';

export default defineConfig({
// base: process.env.NODE_ENV === 'production'
// ? '/PetMonitoringSystem-Frontend/'
// : '/',
build:{
chunkSizeWarningLimit:1500,
},
plugins: [

export default ({ mode }) => {
process.env = {...process.env, ...loadEnv(mode, process.cwd())};


return defineConfig({
// base: process.env.NODE_ENV === 'production'
// ? '/PetMonitoringSystem-Frontend/'
// : '/',
build:{
chunkSizeWarningLimit:1500,
},
plugins: [
vue(),
vuetify({
autoImport: true,
Expand Down Expand Up @@ -49,24 +54,27 @@ export default defineConfig({
sourcemap: true
}
}),
],
define: { 'process.env': {} },
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'vue$': 'vue/dist/vue.esm.js',
'static': path.resolve(__dirname, '../static'),
'/images':'src/assets/images',
},
},
server: {
proxy: {
'/api': {
target: 'http://127.0.0.1:8000',
changeOrigin: true,
rewrite: (path) => path.replace('', '')
],
define: { 'process.env': {} },
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'vue$': 'vue/dist/vue.esm.js',
'static': path.resolve(__dirname, '../static'),
'/images':'src/assets/images',
},
}
},
},
server: {
proxy: {
'/api': {
// target: `http://${process.env.SERVER_IP}` || '127.0.0.1:8000',
target: `http://140.125.207.230:8000`,
changeOrigin: true,
rewrite: (path) => path.replace('', '')
},
}
},

})
}

})
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2278,6 +2278,11 @@ detect-node@^2.0.4:
resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1"
integrity sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==

dotenv@^16.1.4:
version "16.1.4"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.1.4.tgz#67ac1a10cd9c25f5ba604e4e08bc77c0ebe0ca8c"
integrity sha512-m55RtE8AsPeJBpOIFKihEmqUcoVncQIwo7x9U8ZwLEZw9ZpXboz2c+rvog+jUaJvVrZ5kBOeYQBX5+8Aa/OZQw==

duplexify@^4.1.1:
version "4.1.2"
resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-4.1.2.tgz#18b4f8d28289132fa0b9573c898d9f903f81c7b0"
Expand Down

0 comments on commit 44d4137

Please sign in to comment.