GitBucket
4.6.0
Toggle navigation
Sign in
Files
Branches
1
Tags
Issues
Pull Requests
Labels
Milestones
Wiki
08335
/
hivui-platform-template
hivui平台项目模板
Browse code
add
master
1 parent
801bf03
commit
34312d253dfa2d69e127c62334bdf9d29457abe7
caibinghong
authored
on 1 Jun 2021
Showing
3 changed files
package-lock.json
package.json
vite.config.js
Ignore Space
Show notes
View
package-lock.json
Not supported
Ignore Space
Show notes
View
package.json
{ "name": "hi-vui-template", "version": "1.0.0", "description": "A Vue.js project", "author": "caibinghong <caibinghong@163.com>", "scripts": { "dev": "vite", "vite-build": "vite build", "vite-serve": "vite preview", "start": "npm run dev", "test": "npm run unit && npm run e2e", "lint": "eslint --ext .js,.vue src test/unit test/e2e/specs", "build": "node build/build.js", "build-list": "node build/build.js ./src/modules/a", "build-watch": "node build/build-watch.js", "build-dev": "cross-env BABEL_ENV=dev" }, "dependencies": { "axios": "^0.21.1", "babel-polyfill": "^6.26.0", "classnames": "^2.3.1", "enquire.js": "^2.1.6", "hi-ui": "^1.1.293", "lodash": "^4.17.21", "md5": "^2.3.0", "screenfull": "^5.1.0", "sortablejs": "^1.13.0", "vue": "^2.6.12", "vue-draggable-resizable": "^2.3.0", "vue-gemini-scrollbar": "^2.0.1", "vue-jstree": "^2.1.6", "vue-router": "^3.0.1", "vuex": "^3.6.2" }, "devDependencies": { "@vitejs/plugin-vue": "^1.2.2", "@vitejs/plugin-vue-jsx": "^1.1.5", "@vue/babel-plugin-jsx": "^1.0.6", "@vue/compiler-sfc": "^3.0.11", "autoprefixer": "^7.1.2", "babel-core": "^6.22.1", "babel-eslint": "^8.2.1", "babel-helper-vue-jsx-merge-props": "^2.0.3", "babel-loader": "^7.1.1", "babel-plugin-component": "^1.1.1", "babel-plugin-istanbul": "^4.1.1", "babel-plugin-syntax-jsx": "^6.18.0", "babel-plugin-transform-runtime": "^6.22.0", "babel-plugin-transform-vue-jsx": "^3.5.0", "babel-preset-env": "^1.3.2", "babel-preset-stage-2": "^6.22.0", "babel-register": "^6.22.0", "chai": "^4.1.2", "chalk": "^2.0.1", "copy-webpack-plugin": "^4.0.1", "cross-env": "^5.0.1", "cross-spawn": "^5.0.1", "css-loader": "^0.28.0", "eslint": "^4.15.0", "eslint-config-standard": "^10.2.1", "eslint-friendly-formatter": "^3.0.0", "eslint-loader": "^1.7.1", "eslint-plugin-import": "^2.7.0", "eslint-plugin-node": "^5.2.0", "eslint-plugin-promise": "^3.4.0", "eslint-plugin-standard": "^3.0.1", "eslint-plugin-vue": "^4.0.0", "extract-text-webpack-plugin": "^3.0.0", "file-loader": "^1.1.4", "friendly-errors-webpack-plugin": "^1.6.1", "happypack": "^5.0.1", "html-webpack-plugin": "^2.30.1", "inject-loader": "^3.0.0", "less": "^4.1.1", "less-loader": "^3.0.0", "mocha": "^3.2.0", "nightwatch": "^0.9.12", "node-notifier": "^5.1.2", "node-sass": "^4.13.0", "optimize-css-assets-webpack-plugin": "^3.2.0", "ora": "^1.2.0", "phantomjs-prebuilt": "^2.1.14", "portfinder": "^1.0.13", "postcss-import": "^11.0.0", "postcss-loader": "^2.0.8", "postcss-url": "^7.2.1", "rimraf": "^2.6.0", "sass-loader": "^8.0.2", "selenium-server": "^3.0.1", "semver": "^5.3.0", "shelljs": "^0.7.6", "sinon": "^4.0.0", "sinon-chai": "^2.8.0", "uglifyjs-webpack-plugin": "^1.1.1", "url-loader": "^0.5.8", "vite": "^2.2.4", "vite-plugin-vue2": "^1.5.1", "vue-loader": "^13.3.0", "vue-style-loader": "^3.0.1", "vue-template-compiler": "^2.6.12", "webpack": "^3.6.0", "webpack-bundle-analyzer": "^2.9.0", "webpack-dev-server": "^2.9.1", "webpack-merge": "^4.1.0", "webpackbar": "^5.0.0-3" }, "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" }, "browserslist": [ "> 1%", "last 2 versions", "not ie <= 8" ] }
{ "name": "hi-vui-template", "version": "1.0.0", "description": "A Vue.js project", "author": "caibinghong <caibinghong@163.com>", "scripts": { "dev": "vite", "vite-build": "vite build", "vite-serve": "vite preview", "start": "npm run dev", "test": "npm run unit && npm run e2e", "lint": "eslint --ext .js,.vue src test/unit test/e2e/specs", "build": "node build/build.js", "build-list": "node build/build.js ./src/modules/a", "build-watch": "node build/build-watch.js", "build-dev": "cross-env BABEL_ENV=dev" }, "dependencies": { "axios": "^0.21.1", "babel-polyfill": "^6.26.0", "classnames": "^2.3.1", "enquire.js": "^2.1.6", "hi-ui": "^1.1.293", "lodash": "^4.17.21", "md5": "^2.3.0", "screenfull": "^5.1.0", "sortablejs": "^1.13.0", "vue": "^2.6.12", "vue-draggable-resizable": "^2.3.0", "vue-gemini-scrollbar": "^2.0.1", "vue-jstree": "^2.1.6", "vue-router": "^3.0.1", "vuex": "^3.6.2" }, "devDependencies": { "@vitejs/plugin-vue": "^1.2.2", "@vue/babel-plugin-jsx": "^1.0.6", "@vue/compiler-sfc": "^3.0.11", "autoprefixer": "^7.1.2", "babel-core": "^6.22.1", "babel-eslint": "^8.2.1", "babel-helper-vue-jsx-merge-props": "^2.0.3", "babel-loader": "^7.1.1", "babel-plugin-component": "^1.1.1", "babel-plugin-istanbul": "^4.1.1", "babel-plugin-syntax-jsx": "^6.18.0", "babel-plugin-transform-runtime": "^6.22.0", "babel-plugin-transform-vue-jsx": "^3.5.0", "babel-preset-env": "^1.3.2", "babel-preset-stage-2": "^6.22.0", "babel-register": "^6.22.0", "chai": "^4.1.2", "chalk": "^2.0.1", "copy-webpack-plugin": "^4.0.1", "cross-env": "^5.0.1", "cross-spawn": "^5.0.1", "css-loader": "^0.28.0", "eslint": "^4.15.0", "eslint-config-standard": "^10.2.1", "eslint-friendly-formatter": "^3.0.0", "eslint-loader": "^1.7.1", "eslint-plugin-import": "^2.7.0", "eslint-plugin-node": "^5.2.0", "eslint-plugin-promise": "^3.4.0", "eslint-plugin-standard": "^3.0.1", "eslint-plugin-vue": "^4.0.0", "extract-text-webpack-plugin": "^3.0.0", "file-loader": "^1.1.4", "friendly-errors-webpack-plugin": "^1.6.1", "happypack": "^5.0.1", "html-webpack-plugin": "^2.30.1", "inject-loader": "^3.0.0", "less": "^4.1.1", "less-loader": "^3.0.0", "mocha": "^3.2.0", "nightwatch": "^0.9.12", "node-notifier": "^5.1.2", "node-sass": "^4.13.0", "optimize-css-assets-webpack-plugin": "^3.2.0", "ora": "^1.2.0", "phantomjs-prebuilt": "^2.1.14", "portfinder": "^1.0.13", "postcss-import": "^11.0.0", "postcss-loader": "^2.0.8", "postcss-url": "^7.2.1", "rimraf": "^2.6.0", "sass-loader": "^8.0.2", "selenium-server": "^3.0.1", "semver": "^5.3.0", "shelljs": "^0.7.6", "sinon": "^4.0.0", "sinon-chai": "^2.8.0", "uglifyjs-webpack-plugin": "^1.1.1", "url-loader": "^0.5.8", "vite": "^2.2.4", "vite-plugin-vue2": "^1.5.1", "vue-loader": "^13.3.0", "vue-style-loader": "^3.0.1", "vue-template-compiler": "^2.6.12", "webpack": "^3.6.0", "webpack-bundle-analyzer": "^2.9.0", "webpack-dev-server": "^2.9.1", "webpack-merge": "^4.1.0", "webpackbar": "^5.0.0-3" }, "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" }, "browserslist": [ "> 1%", "last 2 versions", "not ie <= 8" ] }
Ignore Space
Show notes
View
vite.config.js
// vite.config.js 利害浏览器自带的 es 动态导入,使项目冷启动 const { resolve } = require('path'); import { defineConfig } from 'vite' // import vue from '@vitejs/plugin-vue' //(1) import { createVuePlugin } from "vite-plugin-vue2"; import vueJsx from '@vitejs/plugin-vue-jsx' let build = { sourcemap: false, //编译 //指定 多个 .html 文件作为入口点 rollupOptions: { // 请确保外部化那些你的库中不需要的依赖 // external: ['vue'], input: { main: resolve(__dirname, 'index.html'), nested: resolve(__dirname, 'nested/index.html') }, output: { format: 'umd', } } } // https://vitejs.dev/config/ export default defineConfig({ build:build, css: { preprocessorOptions: { less: { javascriptEnabled: true, } }, }, resolve: { extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue', '.dtvevt', '.dtv'], alias: { // 'vue$': 'vue/dist/vue.esm.js', '@admin':resolve('project/admin'), // 注意: 静态资源通过src,不能这么设置。 // "@assets": path.join(__dirname, "..", "src", "assets"), } }, plugins: [ createVuePlugin(), vueJsx({ // options are passed on to @vue/babel-plugin-jsx }) ], optimizeDeps:{ // exclude:["hi-ui"],//冷启动时,排除的包 }, devServer: { port:227, proxy: 'http://192.168.1.183:5001/' } })
// vite.config.js 利害浏览器自带的 es 动态导入,使项目冷启动 const { resolve } = require('path'); import { defineConfig } from 'vite' // import vue from '@vitejs/plugin-vue' //(1) // import { createVuePlugin } from "vite-plugin-vue2"; const { createVuePlugin } = require('vite-plugin-vue2') // import viteExmaple from "./vite-plugin/exmaple.js"; // import viteServe from "./vite-plugin/server"; let build = { sourcemap: false, //编译 //指定 多个 .html 文件作为入口点 rollupOptions: { // 请确保外部化那些你的库中不需要的依赖 // external: ['vue'], input: { main: resolve(__dirname, 'index.html'), nested: resolve(__dirname, 'nested/index.html') }, output: { format: 'umd', } } } // https://vitejs.dev/config/ export default defineConfig({ build:build, css: { preprocessorOptions: { less: { javascriptEnabled: true, } }, }, resolve: { extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue', '.dtvevt', '.dtv'], alias: { // 'vue$': 'vue/dist/vue.esm.js', '@admin':resolve('project/admin'), // 注意: 静态资源通过src,不能这么设置。 // "@assets": path.join(__dirname, "..", "src", "assets"), } }, // plugins: [vue()] //(1) plugins: [ createVuePlugin() ], optimizeDeps:{ // exclude:["hi-ui"],//冷启动时,排除的包 }, compilerOptions: { "jsx": "preserve" }, devServer: { port:227, proxy: 'http://192.168.1.183:5001/' } })
Show line notes below