From 911d4ea37baa4c43a52f7eac1fa26abb8a7de85c Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Wed, 13 Oct 2021 02:27:25 +0800 Subject: [PATCH] move vite.config.js to config folder --- vite.config.js => config/vite.config.js | 14 +++++++------- package.json | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) rename vite.config.js => config/vite.config.js (62%) diff --git a/vite.config.js b/config/vite.config.js similarity index 62% rename from vite.config.js rename to config/vite.config.js index 6be31f5e..a9701d42 100644 --- a/vite.config.js +++ b/config/vite.config.js @@ -1,9 +1,9 @@ -import legacy from "@vitejs/plugin-legacy" -import vue from "@vitejs/plugin-vue" -import { defineConfig } from "vite" +import legacy from "@vitejs/plugin-legacy"; +import vue from "@vitejs/plugin-vue"; +import { defineConfig } from "vite"; -const postCssScss = require("postcss-scss") -const postcssRTLCSS = require('postcss-rtlcss'); +const postCssScss = require("postcss-scss"); +const postcssRTLCSS = require("postcss-rtlcss"); // https://vitejs.dev/config/ export default defineConfig({ @@ -20,5 +20,5 @@ export default defineConfig({ "map": false, "plugins": [postcssRTLCSS] } - }, -}) + }, +}); diff --git a/package.json b/package.json index 6cb8d9db..03fdebbd 100644 --- a/package.json +++ b/package.json @@ -15,17 +15,17 @@ "lint:js": "eslint --ext \".js,.vue\" --ignore-path .gitignore .", "lint:style": "stylelint \"**/*.{vue,css,scss}\" --ignore-path .gitignore", "lint": "npm run lint:js && npm run lint:style", - "dev": "vite --host", + "dev": "vite --host --config ./config/vite.config.js", "start": "npm run start-server", "start-server": "node server/server.js", "start-server-dev": "cross-env NODE_ENV=development node server/server.js", - "build": "vite build", + "build": "vite build --config ./config/vite.config.js", "test": "node test/prepare-test-server.js && node server/server.js --port=3002 --data-dir=./data/test/ --test", "test-with-build": "npm run build && npm test", "jest": "node test/prepare-jest.js && npm run jest-frontend && jest ", "jest-frontend": "cross-env TEST_FRONTEND=1 jest --config=./jest-frontend.config.js", "tsc": "tsc", - "vite-preview-dist": "vite preview --host", + "vite-preview-dist": "vite preview --host --config ./config/vite.config.js", "build-docker": "npm run build-docker-debian && npm run build-docker-alpine", "build-docker-alpine-base": "docker buildx build -f docker/alpine-base.dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:base-alpine . --push", "build-docker-debian-base": "docker buildx build -f docker/debian-base.dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:base-debian . --push",