fix: warning during vite build except that of antd

This commit is contained in:
0xJacky 2023-12-02 11:09:07 +08:00
parent dcdd87ac1b
commit 3098af113c
No known key found for this signature in database
GPG key ID: B6E4A6E4A561BAF0
9 changed files with 36 additions and 50 deletions

View file

@ -4,7 +4,7 @@
<meta charset="UTF-8"/> <meta charset="UTF-8"/>
<link href="/favicon.ico" rel="icon"> <link href="/favicon.ico" rel="icon">
<meta content="width=device-width,initial-scale=1.0,user-scalable=0" name="viewport"> <meta content="width=device-width,initial-scale=1.0,user-scalable=0" name="viewport">
<style type="text/css"> <style>
body { body {
height: auto !important; height: auto !important;
min-height: 100%; min-height: 100%;
@ -17,7 +17,7 @@
height: 100%; height: 100%;
} }
</style> </style>
<title><%- title %></title> <title>Nginx UI</title>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>

View file

@ -1,6 +1,7 @@
{ {
"name": "nginx-ui-app-next", "name": "nginx-ui-app-next",
"version": "2.0.0-beta.4", "version": "2.0.0-beta.4",
"type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"typecheck": "vue-tsc --noEmit", "typecheck": "vue-tsc --noEmit",
@ -28,7 +29,7 @@
"pinia-plugin-persistedstate": "^3.0.2", "pinia-plugin-persistedstate": "^3.0.2",
"reconnecting-websocket": "^4.4.0", "reconnecting-websocket": "^4.4.0",
"sortablejs": "^1.15.0", "sortablejs": "^1.15.0",
"vite-plugin-build-id": "^0.2.5", "vite-plugin-build-id": "^0.2.6",
"vue": "^3.3.9", "vue": "^3.3.9",
"vue-github-button": "https://github.com/0xJacky/vue-github-button", "vue-github-button": "https://github.com/0xJacky/vue-github-button",
"vue-router": "^4.2.5", "vue-router": "^4.2.5",

20
app/pnpm-lock.yaml generated
View file

@ -57,8 +57,8 @@ dependencies:
specifier: ^1.15.0 specifier: ^1.15.0
version: 1.15.0 version: 1.15.0
vite-plugin-build-id: vite-plugin-build-id:
specifier: ^0.2.5 specifier: ^0.2.6
version: 0.2.5(less@4.2.0) version: 0.2.6(less@4.2.0)
vue: vue:
specifier: ^3.3.9 specifier: ^3.3.9
version: 3.3.9(typescript@5.3.2) version: 3.3.9(typescript@5.3.2)
@ -1105,8 +1105,8 @@ packages:
undici-types: 5.26.5 undici-types: 5.26.5
dev: false dev: false
/@types/node@20.10.1: /@types/node@20.10.2:
resolution: {integrity: sha512-T2qwhjWwGH81vUEx4EXmBKsTJRXFXNZTL4v0gi01+zyBmCwzE6TyHszqX01m+QHTEq+EZNo13NeJIdEqf+Myrg==} resolution: {integrity: sha512-37MXfxkb0vuIlRKHNxwCkb60PNBpR94u4efQuN4JgIAm66zfCDXGSAFCef9XUWFovX2R1ok6Z7MHhtdVXXkkIw==}
dependencies: dependencies:
undici-types: 5.26.5 undici-types: 5.26.5
dev: false dev: false
@ -5196,13 +5196,13 @@ packages:
spdx-expression-parse: 3.0.1 spdx-expression-parse: 3.0.1
dev: true dev: true
/vite-plugin-build-id@0.2.5(less@4.2.0): /vite-plugin-build-id@0.2.6(less@4.2.0):
resolution: {integrity: sha512-qnCqiaMjXwDABlQjM7+x6j6vmkcpK5MFgtCyPdBzNL9XOxRl6DNw1/9KPqbuEI7+rlz102jr9XSILxbab4kU3w==} resolution: {integrity: sha512-P9Xa4FPou8LuRhEaq+vCWadHnfgOdzEjhqcm1u39zp4grZke2RRCZFPI6V/loiZBStMY40Zj8EQ35Rmnj6i9xQ==}
dependencies: dependencies:
'@types/node': 20.10.1 '@types/node': 20.10.2
rimraf: 5.0.5 rimraf: 5.0.5
typescript: 5.3.2 typescript: 5.3.2
vite: 5.0.4(@types/node@20.10.1)(less@4.2.0) vite: 5.0.4(@types/node@20.10.2)(less@4.2.0)
transitivePeerDependencies: transitivePeerDependencies:
- less - less
- lightningcss - lightningcss
@ -5277,7 +5277,7 @@ packages:
fsevents: 2.3.3 fsevents: 2.3.3
dev: true dev: true
/vite@5.0.4(@types/node@20.10.1)(less@4.2.0): /vite@5.0.4(@types/node@20.10.2)(less@4.2.0):
resolution: {integrity: sha512-RzAr8LSvM8lmhB4tQ5OPcBhpjOZRZjuxv9zO5UcxeoY2bd3kP3Ticd40Qma9/BqZ8JS96Ll/jeBX9u+LJZrhVg==} resolution: {integrity: sha512-RzAr8LSvM8lmhB4tQ5OPcBhpjOZRZjuxv9zO5UcxeoY2bd3kP3Ticd40Qma9/BqZ8JS96Ll/jeBX9u+LJZrhVg==}
engines: {node: ^18.0.0 || >=20.0.0} engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true hasBin: true
@ -5305,7 +5305,7 @@ packages:
terser: terser:
optional: true optional: true
dependencies: dependencies:
'@types/node': 20.10.1 '@types/node': 20.10.2
esbuild: 0.19.7 esbuild: 0.19.7
less: 4.2.0 less: 4.2.0
postcss: 8.4.31 postcss: 8.4.31

View file

@ -1 +1 @@
{"version":"2.0.0-beta.4","build_id":64,"total_build":268} {"version":"2.0.0-beta.4","build_id":67,"total_build":271}

View file

@ -1,20 +1,29 @@
{ {
"extends": "@vue/tsconfig/tsconfig.json",
"compilerOptions": { "compilerOptions": {
"target": "ESNext", "target": "ESNext",
"useDefineForClassFields": true, "useDefineForClassFields": true,
"module": "ESNext", "module": "ESNext",
"moduleResolution": "Node",
"strict": true,
"jsx": "preserve",
"sourceMap": true,
"resolveJsonModule": true,
"isolatedModules": true,
"esModuleInterop": true,
"lib": [ "lib": [
"ESNext", "ESNext",
"DOM" "DOM",
"DOM.Iterable"
], ],
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "preserve",
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"esModuleInterop": true,
"skipLibCheck": true, "skipLibCheck": true,
"baseUrl": ".", "baseUrl": ".",
"paths": { "paths": {

View file

@ -2,7 +2,7 @@
"compilerOptions": { "compilerOptions": {
"composite": true, "composite": true,
"module": "ESNext", "module": "ESNext",
"moduleResolution": "Node", "moduleResolution": "bundler",
"allowSyntheticDefaultImports": true "allowSyntheticDefaultImports": true
}, },
"include": [ "include": [

View file

@ -1 +1 @@
{"version":"2.0.0-beta.4","build_id":64,"total_build":268} {"version":"2.0.0-beta.4","build_id":67,"total_build":271}

View file

@ -1,10 +1,10 @@
import { URL, fileURLToPath } from 'node:url' import { URL, fileURLToPath } from 'node:url'
import { defineConfig } from 'vite' import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue' import vue from '@vitejs/plugin-vue'
import { createHtmlPlugin } from 'vite-plugin-html'
import Components from 'unplugin-vue-components/vite' import Components from 'unplugin-vue-components/vite'
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers' import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers'
import vueJsx from '@vitejs/plugin-vue-jsx' import vueJsx from '@vitejs/plugin-vue-jsx'
import vitePluginBuildId from 'vite-plugin-build-id' import vitePluginBuildId from 'vite-plugin-build-id'
import svgLoader from 'vite-svg-loader' import svgLoader from 'vite-svg-loader'
import AutoImport from 'unplugin-auto-import/vite' import AutoImport from 'unplugin-auto-import/vite'
@ -43,30 +43,6 @@ export default defineConfig({
vueTemplate: true, vueTemplate: true,
}), }),
DefineOptions(), DefineOptions(),
createHtmlPlugin({
minify: true,
/**
* After writing entry here, you will not need to add script tags in `index.html`, the original tags need to be deleted
* @default src/main.ts
*/
entry: '/src/main.ts',
/**
* If you want to store `index.html` in the specified folder, you can modify it, otherwise no configuration is required
* @default index.html
*/
template: 'index.html',
/**
* Data that needs to be injected into the index.html ejs template
*/
inject: {
data: {
title: 'Nginx UI',
},
},
}),
], ],
css: { css: {
preprocessorOptions: { preprocessorOptions: {