mirror of
https://github.com/jekip/naive-ui-admin.git
synced 2026-02-04 13:42:27 +08:00
@@ -2,9 +2,9 @@
|
||||
* Plugin to minimize and use ejs template syntax in index.html.
|
||||
* https://github.com/anncwb/vite-plugin-html
|
||||
*/
|
||||
import type { Plugin } from 'vite';
|
||||
import type { PluginOption } from 'vite';
|
||||
|
||||
import html from 'vite-plugin-html';
|
||||
import { createHtmlPlugin } from 'vite-plugin-html';
|
||||
|
||||
import pkg from '../../../package.json';
|
||||
import { GLOB_CONFIG_FILE_NAME } from '../../constant';
|
||||
@@ -18,11 +18,11 @@ export function configHtmlPlugin(env: ViteEnv, isBuild: boolean) {
|
||||
return `${path || '/'}${GLOB_CONFIG_FILE_NAME}?v=${pkg.version}-${new Date().getTime()}`;
|
||||
};
|
||||
|
||||
const htmlPlugin: Plugin[] = html({
|
||||
const htmlPlugin: PluginOption[] = createHtmlPlugin({
|
||||
minify: isBuild,
|
||||
inject: {
|
||||
// Inject data into ejs template
|
||||
injectData: {
|
||||
data: {
|
||||
title: VITE_GLOB_APP_TITLE,
|
||||
},
|
||||
// Embed the generated app.config.js file
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Plugin } from 'vite';
|
||||
import type { Plugin,PluginOption } from 'vite';
|
||||
import Components from 'unplugin-vue-components/vite';
|
||||
import { NaiveUiResolver } from 'unplugin-vue-components/resolvers';
|
||||
|
||||
@@ -12,7 +12,7 @@ import { configCompressPlugin } from './compress';
|
||||
export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean, prodMock) {
|
||||
const { VITE_USE_MOCK, VITE_BUILD_COMPRESS, VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE } = viteEnv;
|
||||
|
||||
const vitePlugins: (Plugin | Plugin[])[] = [
|
||||
const vitePlugins: (Plugin | Plugin[] | PluginOption[])[] = [
|
||||
// have to
|
||||
vue(),
|
||||
// have to
|
||||
|
||||
114
package.json
114
package.json
@@ -28,74 +28,76 @@
|
||||
"test prod gzip": "http-server dist --cors --gzip -c-1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vicons/antd": "^0.10.0",
|
||||
"@vicons/ionicons5": "^0.10.0",
|
||||
"@vueup/vue-quill": "^1.0.0-beta.8",
|
||||
"@vueuse/core": "^5.3.0",
|
||||
"axios": "^0.21.4",
|
||||
"@vicons/antd": "^0.12.0",
|
||||
"@vicons/ionicons5": "^0.12.0",
|
||||
"@vueup/vue-quill": "^1.0.0",
|
||||
"@vueuse/core": "^9.5.0",
|
||||
"axios": "^1.1.3",
|
||||
"blueimp-md5": "^2.19.0",
|
||||
"date-fns": "^2.28.0",
|
||||
"echarts": "^5.3.2",
|
||||
"date-fns": "^2.29.3",
|
||||
"echarts": "^5.4.0",
|
||||
"element-resize-detector": "^1.2.4",
|
||||
"lodash": "^4.17.21",
|
||||
"lodash-es": "^4.17.21",
|
||||
"mitt": "^2.1.0",
|
||||
"mitt": "^3.0.0",
|
||||
"mockjs": "^1.1.0",
|
||||
"naive-ui": "^2.33.5",
|
||||
"pinia": "^2.0.14",
|
||||
"qs": "^6.10.3",
|
||||
"vfonts": "^0.1.0",
|
||||
"vue": "^3.2.33",
|
||||
"vue-router": "^4.0.15",
|
||||
"vue-types": "^4.1.1",
|
||||
"vuedraggable": "^4.1.0"
|
||||
"pinia": "^2.0.23",
|
||||
"qs": "^6.11.0",
|
||||
"vfonts": "^0.0.3",
|
||||
"vue": "^3.2.45",
|
||||
"vue-router": "^4.1.6",
|
||||
"vue-types": "^4.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^12.1.4",
|
||||
"@commitlint/config-conventional": "^12.1.4",
|
||||
"@types/lodash": "^4.14.182",
|
||||
"@types/node": "^15.14.9",
|
||||
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
||||
"@typescript-eslint/parser": "^4.33.0",
|
||||
"@vitejs/plugin-vue": "^1.10.2",
|
||||
"@vitejs/plugin-vue-jsx": "^1.3.10",
|
||||
"@vue/compiler-sfc": "^3.2.33",
|
||||
"@vue/eslint-config-typescript": "^7.0.0",
|
||||
"autoprefixer": "^10.4.7",
|
||||
"commitizen": "^4.2.4",
|
||||
"core-js": "^3.22.5",
|
||||
"dotenv": "^10.0.0",
|
||||
"eslint": "^7.32.0",
|
||||
"@commitlint/cli": "^17.2.0",
|
||||
"@commitlint/config-conventional": "^17.2.0",
|
||||
"@types/lodash": "^4.14.188",
|
||||
"@types/node": "^18.11.9",
|
||||
"@typescript-eslint/eslint-plugin": "^5.42.1",
|
||||
"@typescript-eslint/parser": "^5.42.1",
|
||||
"@vitejs/plugin-vue": "^3.2.0",
|
||||
"@vitejs/plugin-vue-jsx": "^2.1.1",
|
||||
"@vue/compiler-sfc": "^3.2.45",
|
||||
"@vue/eslint-config-typescript": "^11.0.2",
|
||||
"autoprefixer": "^10.4.13",
|
||||
"commitizen": "^4.2.5",
|
||||
"core-js": "^3.26.0",
|
||||
"dotenv": "^16.0.3",
|
||||
"eslint": "^8.27.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-define-config": "1.0.9",
|
||||
"eslint-plugin-jest": "^24.7.0",
|
||||
"eslint-plugin-prettier": "^3.4.1",
|
||||
"eslint-plugin-vue": "^7.20.0",
|
||||
"esno": "^0.7.3",
|
||||
"gh-pages": "^3.2.3",
|
||||
"husky": "^6.0.0",
|
||||
"jest": "^27.5.1",
|
||||
"less": "^4.1.2",
|
||||
"less-loader": "^9.1.0",
|
||||
"lint-staged": "^11.2.6",
|
||||
"postcss": "^8.4.13",
|
||||
"prettier": "^2.6.2",
|
||||
"eslint-define-config": "1.12.0",
|
||||
"eslint-plugin-jest": "^27.1.5",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-vue": "^9.7.0",
|
||||
"esno": "^0.16.3",
|
||||
"gh-pages": "^4.0.0",
|
||||
"husky": "^8.0.2",
|
||||
"jest": "^29.3.1",
|
||||
"less": "^4.1.3",
|
||||
"less-loader": "^11.1.0",
|
||||
"lint-staged": "^13.0.3",
|
||||
"postcss": "^8.4.19",
|
||||
"prettier": "^2.7.1",
|
||||
"pretty-quick": "^3.1.3",
|
||||
"rimraf": "^3.0.2",
|
||||
"stylelint": "^13.13.1",
|
||||
"stylelint-config-prettier": "^8.0.2",
|
||||
"stylelint-config-standard": "^22.0.0",
|
||||
"stylelint-order": "^4.1.0",
|
||||
"stylelint-scss": "^3.21.0",
|
||||
"tailwindcss": "^2.2.19",
|
||||
"typescript": "^4.6.4",
|
||||
"unplugin-vue-components": "^0.17.21",
|
||||
"vite": "^2.9.8",
|
||||
"vite-plugin-compression": "^0.3.6",
|
||||
"vite-plugin-html": "^2.1.2",
|
||||
"stylelint": "^14.14.1",
|
||||
"stylelint-config-prettier": "^9.0.4",
|
||||
"stylelint-config-standard": "^29.0.0",
|
||||
"stylelint-order": "^5.0.0",
|
||||
"stylelint-scss": "^4.3.0",
|
||||
"tailwindcss": "^3.2.3",
|
||||
"typescript": "^4.8.4",
|
||||
"unplugin-vue-components": "^0.22.9",
|
||||
"vite": "^3.2.3",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-html": "^3.2.0",
|
||||
"vite-plugin-mock": "^2.9.6",
|
||||
"vite-plugin-style-import": "^1.4.1",
|
||||
"vue-eslint-parser": "^7.11.0"
|
||||
"vite-plugin-style-import": "^2.0.0",
|
||||
"vue-demi": "^0.13.11",
|
||||
"vue-draggable-next": "^2.1.1",
|
||||
"vue-eslint-parser": "^9.1.0",
|
||||
"vuedraggable": "^4.1.0"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{vue,js,ts,tsx}": "eslint --fix"
|
||||
|
||||
5254
pnpm-lock.yaml
generated
5254
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -101,7 +101,7 @@
|
||||
VerticalRightOutlined,
|
||||
VerticalLeftOutlined,
|
||||
} from '@vicons/antd';
|
||||
import Draggable from 'vuedraggable/src/vuedraggable';
|
||||
import Draggable from 'vuedraggable';
|
||||
import { useDesignSetting } from '@/hooks/setting/useDesignSetting';
|
||||
|
||||
interface Options {
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
module.exports = {
|
||||
mode: 'jit',
|
||||
// darkMode: 'class',
|
||||
plugins: [createEnterPlugin()],
|
||||
purge: {
|
||||
content: {
|
||||
enable: process.env.NODE_ENV === 'production',
|
||||
content: ['./index.html', './src/**/*.{vue,ts,tsx}'],
|
||||
},
|
||||
corePlugins: {
|
||||
preflight: false,
|
||||
},
|
||||
theme: {
|
||||
extend: {
|
||||
zIndex: {
|
||||
|
||||
@@ -81,7 +81,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
|
||||
// drop_console: VITE_DROP_CONSOLE,
|
||||
// },
|
||||
// },
|
||||
brotliSize: false,
|
||||
reportCompressedSize: false,
|
||||
chunkSizeWarningLimit: 2000,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user