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 DoWebpackBuild
master
1 parent
0adf764
commit
7548cb451e2c1561e84ca14b23f055472e579ab9
caibinghong
authored
on 7 Mar 2022
Showing
4 changed files
build/webpack.base.conf.js
build/webpack.get-list.js
build/webpack.prod.conf.js
package.json
Ignore Space
Show notes
View
build/webpack.base.conf.js
const path = require('path'); var HtmlWebpackPlugin = require('html-webpack-plugin'); const AddAssetHtmlPlugin = require('add-asset-html-webpack-plugin');//------------ const CleanWebpackPlugin = require('clean-webpack-plugin'); const VueLoaderPlugin = require('vue-loader/lib/plugin'); const CopyWebpackPlugin = require('copy-webpack-plugin'); const ProgressBarPlugin = require('progress-bar-webpack-plugin'); const UglifyJsPlugin = require("uglifyjs-webpack-plugin"); const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin"); const webpack = require('webpack'); const packageConfig = require('../package.json'); const utils = require('./utils') const vueLoaderConfig = require('./vue-loader.conf') let evnConfig = require('./getEnvVar') // HappyPack // 原理:每次 webapck 解析一个模块时,HappyPack 会将它及它的依赖分配到worker线程中。 // 提示:由于HappyPack 对file-loader、url-loader 支持的不友好,所以不建议对该loader使用。 // 引入 Happpack 可以在 package.json 找到你下载的 const HappyPack = require('happypack'); // 安装 OS 模块 这个主要是拿到当前电脑的CPU核数 const os = require('os'); /* 这个是设置共享线程池中的数量 size 控制设置数量 类型 只能是 整数类型 */ const cpus = os.cpus().length; const happyThreadPool = HappyPack.ThreadPool({ size: Math.floor(cpus/2)||1 });// os.cpus().length 不能开最大 // const happyThreadPool = HappyPack.ThreadPool({ size: 1 });//os.cpus().length 不能开最大 let projectName = packageConfig.name == 'hi-vui-template' ? 'project' : packageConfig.name; module.exports = { // entry: { // 'login': ['babel-polyfill', './project/hivuiLogin/index.js'], // 'main': ['babel-polyfill','./project/hivuiMain/index.js'] // }, // output: { // filename: '[name].[contenthash].js', // chunkFilename: '[name].[contenthash].js', // path: path.resolve(__dirname, 'dist') // }, resolve: { extensions: ['.js', '.jsx', '.vue', '.json', '.dtvevt', '.dvue'], alias: { 'vue$': 'vue/dist/vue.esm.js', 'vuex$': 'vuex/dist/vuex.esm.js', '@': path.resolve(__dirname, `${projectName}`), '@main': path.resolve(__dirname, `../${projectName}/hivuiMain`), // '@': path.resolve(__dirname, 'src'), '@birt':path.resolve(__dirname, `../${projectName}/hivuiBirt`), 'pinyin': 'js-pinyin', } }, externals: { 'vue': 'Vue', 'vuex': 'Vuex', 'vue-router': 'VueRouter', "element-ui": "ELEMENT", }, module: { rules: [ ...(utils.styleLoaders({ sourceMap: false, extract: process.env.NODE_ENV === 'production', usePostCSS: true })), { test: /\.(js|jsx|dtvevt?|babel|es6)$/, loader: 'happypack/loader?id=happy_js_jsx', // loader: 'babel-loader', // exclude: [path.resolve(__dirname, 'node_modules')]//放开,里头有些也是 可选链操作符 }, { test: /\.(vue|dvue)$/, // loader: 'happypack/loader?id=happy-vue-loader' ???不行,Make sure the rule matching .vue files include vue-loader in its use. loader: 'vue-loader', options: vueLoaderConfig }, { test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, loader: 'url-loader', options: { limit: 10000, name: '[name].[hash:7].[ext]', publicPath: "../img/", //替换CSS引用的图片路径 可以替换成爱拍云上的路径 outputPath: "static/img/" //生成之后存放的路径 } }, { test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, loader: 'url-loader', options: { limit: 10000, name: '[name].[hash:7].[ext]', publicPath: "../img/", //替换CSS引用的图片路径 可以替换成爱拍云上的路径 outputPath: "static/media/" //生成之后存放的路径 } }, { test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, loader: 'url-loader', options: { limit: 10000, name: '[name].[hash:7].[ext]', publicPath: "../fonts/", //替换CSS引用的图片路径 可以替换成爱拍云上的路径 outputPath: "static/fonts/" //生成之后存放的路径 } } ] }, optimization: { minimizer: [ new UglifyJsPlugin({ cache: true, parallel: true, sourceMap: true }), new OptimizeCSSAssetsPlugin({ cssProcessor: require('cssnano'), cssProcessorPluginOptions: { preset: ['default', { discardComments: { removeAll: true } }], }, canPrint: false }) ], runtimeChunk: { "name": "manifest" }, splitChunks: { cacheGroups: { default: false, vendors: false, vendor: { test: /[\\/]node_modules[\\/]/, name: 'vendors', chunks: 'all' } } } }, plugins: [ new VueLoaderPlugin(), new HappyPack({ id: 'happy_js_jsx', //共享进程池 threadPool: happyThreadPool, loaders: ['babel-loader'] }), // new HappyPack({ // id: 'happy-vue-loader', // loaders: [{ // loader: 'vue-loader', // options:vueLoaderConfig // }], // threadPool: happyThreadPool // }), new webpack.HashedModuleIdsPlugin(), new ProgressBarPlugin(), // new CleanWebpackPlugin(['dist']), //注入全局变量的插件,通常使用该插件来判别代码运行的环境变量 new webpack.DefinePlugin({ 'process.env': evnConfig }), new webpack.DllReferencePlugin({ context: path.resolve(__dirname), manifest: require('../assets_platform/vendor_dll/vendor-manifest.json') }), //这个主要是将生成的vendor.dll.js文件加上hash值插入到页面中。[也可以手动写到html这里不做处理] // new AddAssetHtmlPlugin([{ // filepath: path.resolve(__dirname, 'js_dll/comm_vendors.dll.js'), // outputPath: 'js_dll/', // publicPath: 'js_dll/', // includeSourcemap: false, // hash: true, // }]), // new CopyWebpackPlugin([ // { // from: path.resolve(__dirname, 'assets_platform'), // to: path.resolve(__dirname, 'dist/assets_platform') // }, // // { // // from: path.resolve(__dirname, 'js_dll'), // // to: path.resolve(__dirname, 'dist') // // } // ]) ] };
const path = require('path'); var HtmlWebpackPlugin = require('html-webpack-plugin'); const AddAssetHtmlPlugin = require('add-asset-html-webpack-plugin');//------------ const CleanWebpackPlugin = require('clean-webpack-plugin'); const VueLoaderPlugin = require('vue-loader/lib/plugin'); const CopyWebpackPlugin = require('copy-webpack-plugin'); const ProgressBarPlugin = require('progress-bar-webpack-plugin'); const UglifyJsPlugin = require("uglifyjs-webpack-plugin"); const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin"); const webpack = require('webpack'); const packageConfig = require('../package.json'); const utils = require('./utils') const vueLoaderConfig = require('./vue-loader.conf') let evnConfig = require('./getEnvVar') // HappyPack // 原理:每次 webapck 解析一个模块时,HappyPack 会将它及它的依赖分配到worker线程中。 // 提示:由于HappyPack 对file-loader、url-loader 支持的不友好,所以不建议对该loader使用。 // 引入 Happpack 可以在 package.json 找到你下载的 const HappyPack = require('happypack'); // 安装 OS 模块 这个主要是拿到当前电脑的CPU核数 const os = require('os'); /* 这个是设置共享线程池中的数量 size 控制设置数量 类型 只能是 整数类型 */ const cpus = os.cpus().length; const happyThreadPool = HappyPack.ThreadPool({ size: Math.floor(cpus/2)||1 });//os.cpus().length 不能开最大 // const happyThreadPool = HappyPack.ThreadPool({ size: 1 });//os.cpus().length 不能开最大 let projectName = packageConfig.name == 'hi-vui-template' ? 'project' : packageConfig.name; module.exports = { // entry: { // 'login': ['babel-polyfill', './project/hivuiLogin/index.js'], // 'main': ['babel-polyfill','./project/hivuiMain/index.js'] // }, // output: { // filename: '[name].[contenthash].js', // chunkFilename: '[name].[contenthash].js', // path: path.resolve(__dirname, 'dist') // }, resolve: { extensions: ['.js', '.jsx', '.vue', '.json', '.dtvevt', '.dvue'], alias: { 'vue$': 'vue/dist/vue.esm.js', 'vuex$': 'vuex/dist/vuex.esm.js', '@': path.resolve(__dirname, `${projectName}`), '@main': path.resolve(__dirname, `../${projectName}/hivuiMain`), // '@': path.resolve(__dirname, 'src'), '@birt':path.resolve(__dirname, `../${projectName}/hivuiBirt`), 'pinyin': 'js-pinyin', } }, externals: { 'vue': 'Vue', 'vuex': 'Vuex', 'vue-router': 'VueRouter', "element-ui": "ELEMENT", }, module: { rules: [ ...(utils.styleLoaders({ sourceMap: false, extract: process.env.NODE_ENV === 'production', usePostCSS: true })), { test: /\.(js|jsx|dtvevt?|babel|es6)$/, loader: 'happypack/loader?id=happy_js_jsx', // loader: 'babel-loader', // exclude: [path.resolve(__dirname, 'node_modules')]//放开,里头有些也是 可选链操作符 }, { test: /\.(vue|dvue)$/, // loader: 'happypack/loader?id=happy-vue-loader' ???不行,Make sure the rule matching .vue files include vue-loader in its use. loader: 'vue-loader', options: vueLoaderConfig }, { test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, loader: 'url-loader', options: { limit: 10000, name: '[name].[hash:7].[ext]', publicPath: "../img/", //替换CSS引用的图片路径 可以替换成爱拍云上的路径 outputPath: "static/img/" //生成之后存放的路径 } }, { test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, loader: 'url-loader', options: { limit: 10000, name: '[name].[hash:7].[ext]', publicPath: "../img/", //替换CSS引用的图片路径 可以替换成爱拍云上的路径 outputPath: "static/media/" //生成之后存放的路径 } }, { test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, loader: 'url-loader', options: { limit: 10000, name: '[name].[hash:7].[ext]', publicPath: "../fonts/", //替换CSS引用的图片路径 可以替换成爱拍云上的路径 outputPath: "static/fonts/" //生成之后存放的路径 } } ] }, optimization: { minimizer: [ new UglifyJsPlugin({ cache: true, parallel: true, sourceMap: true }), new OptimizeCSSAssetsPlugin({ cssProcessor: require('cssnano'), cssProcessorPluginOptions: { preset: ['default', { discardComments: { removeAll: true } }], }, canPrint: false }) ], runtimeChunk: { "name": "manifest" }, splitChunks: { cacheGroups: { default: false, vendors: false, vendor: { test: /[\\/]node_modules[\\/]/, name: 'vendors', chunks: 'all' } } } }, plugins: [ new VueLoaderPlugin(), new HappyPack({ id: 'happy_js_jsx', //共享进程池 threadPool: happyThreadPool, loaders: ['babel-loader'] }), // new HappyPack({ // id: 'happy-vue-loader', // loaders: [{ // loader: 'vue-loader', // options:vueLoaderConfig // }], // threadPool: happyThreadPool // }), new webpack.HashedModuleIdsPlugin(), new ProgressBarPlugin(), // new CleanWebpackPlugin(['dist']), //注入全局变量的插件,通常使用该插件来判别代码运行的环境变量 new webpack.DefinePlugin({ 'process.env': evnConfig }), new webpack.DllReferencePlugin({ context: path.resolve(__dirname), manifest: require('../assets_platform/vendor_dll/vendor-manifest.json') }), //这个主要是将生成的vendor.dll.js文件加上hash值插入到页面中。[也可以手动写到html这里不做处理] // new AddAssetHtmlPlugin([{ // filepath: path.resolve(__dirname, 'js_dll/comm_vendors.dll.js'), // outputPath: 'js_dll/', // publicPath: 'js_dll/', // includeSourcemap: false, // hash: true, // }]), // new CopyWebpackPlugin([ // { // from: path.resolve(__dirname, 'assets_platform'), // to: path.resolve(__dirname, 'dist/assets_platform') // }, // // { // // from: path.resolve(__dirname, 'js_dll'), // // to: path.resolve(__dirname, 'dist') // // } // ]) ] };
Ignore Space
Show notes
View
build/webpack.get-list.js
const path = require("path"); const fs = require("fs"); // const {Chalk} = require('chalk') const merge = require('webpack-merge'); const webpack = require('webpack'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const CleanWebpackPlugin = require('clean-webpack-plugin'); const MiniCssExtractPlugin = require("mini-css-extract-plugin"); const baseWebpackConfig = require('./webpack.base.conf'); const packageConfig = require('../package.json'); // console.log('---------------------webpack.get-list.js------------', process.env.NODE_ENV) // 用来记录当前打包的模块路径列表,判断进程参数 let argvs = (process.argv[2] || "").replace(/\s*$/g, "") let moduleList = require('./webpack.get-module').moduleList || []; if(argvs){ // console.log('指定模块编译:') moduleList = argvs.split(',') } let evnConfig = require('./getEnvVar') let webpackList = []; //构建webpack 配置 for (let i = 0, l = moduleList.length; i < l; i++) { let MODULE = moduleList[i]; // console.log(i, MODULE); //添加每个模块的webpack 配置 let MODULE_NAME = MODULE.split('/').pop(); let entry = {}; let outputPath = path.resolve(__dirname, '../dist', MODULE) entry[MODULE_NAME] = ['babel-polyfill', `${MODULE}/index.js`];// @babel/polyfill let wpk = merge({ mode: 'production', // mode: 'development', // devtool: 'source-map', }, baseWebpackConfig, { entry: entry, output: { path: outputPath, filename: `static/js/[name].js`, // publicPath:'./' // publicPath: `/${evnConfig.VITE_APP_SERVER.replace(/"/gi,"")}/render/${packageConfig.author}/${MODULE.replace('./', '')}/` publicPath: `${evnConfig.VITE_APP_USERPATH.replace(/"/gi,"")}/${MODULE.replace('./', '')}/` } }); let htmlTemplate = `${MODULE}/index.html` var checkPath = fs.existsSync(htmlTemplate); //如果目录存在 返回 true ,如果目录不存在 返回false if (checkPath == false) { htmlTemplate = path.resolve(__dirname, './template.html') } wpk.plugins.push(new CleanWebpackPlugin([outputPath], { root: path.resolve(__dirname, '../'), //根目录 //其他配置按需求添加 })); wpk.plugins.push( new MiniCssExtractPlugin({ filename: 'static/css/[name].[contenthash].css', chunkFilename: `static/css/[name].[contenthash].css` }) ); wpk.plugins.push( new HtmlWebpackPlugin({ filename: path.resolve(__dirname, '../dist', MODULE, 'index.html'), template: htmlTemplate,//如果html 不存在考虑用全局根目录下 inject: true, minify: { removeComments: true,//去除注释 collapseWhitespace: true,//是否去除空格 removeAttributeQuotes: true//去除空属性 }, compile: true })) webpackList.push(wpk); } module.exports = webpackList;// [webpackList[4]] ////[webpackList[3]];//27
const path = require("path"); const fs = require("fs"); // const {Chalk} = require('chalk') const merge = require('webpack-merge'); const webpack = require('webpack'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const CleanWebpackPlugin = require('clean-webpack-plugin'); const MiniCssExtractPlugin = require("mini-css-extract-plugin"); const baseWebpackConfig = require('./webpack.base.conf'); const packageConfig = require('../package.json'); console.log('---------------------webpack.get-list.js------------', process.env.NODE_ENV) // 用来记录当前打包的模块路径列表,判断进程参数 let argvs = (process.argv[2] || "").replace(/\s*$/g, "") let moduleList = require('./webpack.get-module').moduleList || []; if(argvs){ console.log('指定模块编译:') moduleList = argvs.split(',') } let evnConfig = require('./getEnvVar') let webpackList = []; //构建webpack 配置 for (let i = 0, l = moduleList.length; i < l; i++) { let MODULE = moduleList[i]; // console.log(i, MODULE); //添加每个模块的webpack 配置 let MODULE_NAME = MODULE.split('/').pop(); let entry = {}; let outputPath = path.resolve(__dirname, '../dist', MODULE) entry[MODULE_NAME] = ['babel-polyfill', `${MODULE}/index.js`];// @babel/polyfill let wpk = merge({ mode: 'production', // mode: 'development', // devtool: 'source-map', }, baseWebpackConfig, { entry: entry, output: { path: outputPath, filename: `static/js/[name].js`, // publicPath:'./' // publicPath: `/${evnConfig.VITE_APP_SERVER.replace(/"/gi,"")}/render/${packageConfig.author}/${MODULE.replace('./', '')}/` publicPath: `${evnConfig.VITE_APP_USERPATH.replace(/"/gi,"")}/${MODULE.replace('./', '')}/` } }); let htmlTemplate = `${MODULE}/index.html` var checkPath = fs.existsSync(htmlTemplate); //如果目录存在 返回 true ,如果目录不存在 返回false if (checkPath == false) { htmlTemplate = path.resolve(__dirname, './template.html') } wpk.plugins.push(new CleanWebpackPlugin([outputPath], { root: path.resolve(__dirname, '../'), //根目录 //其他配置按需求添加 })); wpk.plugins.push( new MiniCssExtractPlugin({ filename: 'static/css/[name].[contenthash].css', chunkFilename: `static/css/[name].[contenthash].css` }) ); wpk.plugins.push( new HtmlWebpackPlugin({ filename: path.resolve(__dirname, '../dist', MODULE, 'index.html'), template: htmlTemplate,//如果html 不存在考虑用全局根目录下 inject: true, minify: { removeComments: true,//去除注释 collapseWhitespace: true,//是否去除空格 removeAttributeQuotes: true//去除空属性 }, compile: true })) webpackList.push(wpk); } module.exports = webpackList;// [webpackList[4]] ////[webpackList[3]];//27
Ignore Space
Show notes
View
build/webpack.prod.conf.js
// 多进程 编译所有 //parallel-webpack允许您并行运行多个Webpack构建,从而将工作分散到各个处理器上,从而有助于显着加快构建速度 // const os = require('os'); // const cpus = os.cpus().length; // console.log(cpus, ' Math.floor(cpus/2)||1', Math.floor(cpus / 2) || 1) const chalk = require('chalk') let webpack = require('webpack') let argvs = (process.argv[2] || "").replace(/\s*$/g, ""); let moduleList = argvs != "" ? argvs.split(',') : []; let len = moduleList.length; let startTime = new Date().valueOf(); //----------- 【一般编译,按参数,一个接一个的】 --------------- function DoWebpackBuild(list, i, l) { let wpkCfg, step = 1, isAll = false; if (i == null && l == null) { //------------ 【webpack 一口气编译指定的所有功能】 -------------- isAll = true; wpkCfg = list; console.log(`【编译所有】=====================\n`) } else { wpkCfg = list[i]; if (wpkCfg == null) { console.log(chalk.green(`消耗 ${(new Date().valueOf() - startTime) / 1000} 秒`)); return; } console.log(chalk.yellow(`进度 ${i + 1}/${l} ,正在编译${wpkCfg.output.path}\n`)); } webpack(wpkCfg, (err, stats) => { //这个回调一定要写,不然打包不出来 if (err || stats.hasErrors()) {//编译错误不在 err 对象内,而是需要使用 stats.hasErrors() 单独处理 let info = {}; try { info = stats.toJson(); } catch (e) { info = { errors: [] }; console.log('stats.toJson()', err, stats) } // console.error(info.errors); for (let i = 0, l = info.errors.length; i < l; i++) { // console.log(chalk.red(info.errors[i].message)); // console.error(info.errors[i].message) console.error(info.errors[i]) } } // 处理完成 if (isAll) { console.log(chalk.green(`消耗 ${(new Date().valueOf() - startTime) / 1000} 秒`)); } isAll == false && DoWebpackBuild(list, i + step, l); }); } if (len == 0) { //-------- 【用parallel-webpack,全部编译情况下】 ------------ /* moduleList = require('./webpack.get-module').moduleList || []; console.log(`=========进入全模块编译状态(${moduleList.length})模块...=============`) var run = require('parallel-webpack').run; run( require.resolve('./webpack.get-list.js'), { watch: false, maxRetries: 1, stats: false, // defaults to false maxConcurrentWorkers: 1,// use 2 workers cup个数 argv: [argvs] }, ()=>{ //多打包时,如果其中一个模块出错,不知道是哪个模块 console.log('\n--------编译完成------- \n'); }); */ let webpackList = require('./webpack.get-list.js'); len = webpackList.length; DoWebpackBuild(webpackList);//, 0, len //以上两种时间上差不多 20s } else { let webpackList = require('./webpack.get-list.js'); len = webpackList.length; DoWebpackBuild(webpackList, 0, len) }
// 多进程 编译所有 //parallel-webpack允许您并行运行多个Webpack构建,从而将工作分散到各个处理器上,从而有助于显着加快构建速度 const os = require('os'); const cpus = os.cpus().length; console.log(cpus,' Math.floor(cpus/2)||1', Math.floor(cpus/2)||1) let webpack = require('webpack') let argvs = (process.argv[2] || "").replace(/\s*$/g, "") var run = require('parallel-webpack').run, configPath = require.resolve('./webpack.get-list.js'), options = { watch: false, maxRetries: 1, stats: false, // defaults to false maxConcurrentWorkers: 1,// use 2 workers cup个数 argv: [argvs] }; function notify(res) { //多打包时,如果其中一个模块出错,不知道是哪个模块 console.log('\n--------编译完成------- \n'); } let moduleList = argvs!=""?argvs.split(','):[]; let len = moduleList.length; if (len == 0) { moduleList = require('./webpack.get-module').moduleList || []; console.log(`=========进入全模块编译状态(${moduleList.length})模块...=============`) run(configPath, options, notify); } else { let webpackList = require('./webpack.get-list.js'); console.log(`=========指定--模块编译状态(${len})模块...=============`) webpack(webpackList, (err, stats) => { //这个回调一定要写,不然打包不出来 if (err || stats.hasErrors()) {//编译错误不在 err 对象内,而是需要使用 stats.hasErrors() 单独处理 let info ={}; try{ info = stats.toJson(); }catch(e){ info={ errors:[] }; console.log('stats.toJson()',err,stats) } // console.error(info.errors); for (let i = 0, l = info.errors.length; i < l; i++) { // console.log(chalk.red(info.errors[i].message)); // console.error(info.errors[i].message) console.error(info.errors[i]) } } // 处理完成 }) }
Ignore Space
Show notes
View
package.json
{ "name": "hi-vui-template", "version": "1.1.9", "description": "A hi-vui-template project", "author": "zhcTeam", "scripts": { "rm:vite": "rimraf node_modules/.vite && rimraf node_modules/.cache", "pm2:start": "pm2 start processes.json", "dev": "vite --host", "build": "node build/copyBaseAssets.js && cross-env NODE_ENV=production node build/webpack.prod.conf.js", "build:modules": "cross-env NODE_ENV=production node build/webpack.prod.conf.js", "build1": "webpack --mode production --config build/webpack.prod.conf.js", "dll": "webpack --config build/webpack.dll.conf.js", "start": "webpack-dev-server --config build/webpack.dev.conf.js", "copyassets": "node build/copyBaseAssets.js" }, "devDependencies": { "@babel/core": "^7.1.2", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7", "@babel/plugin-proposal-optional-chaining": "^7.16.7", "@babel/plugin-syntax-dynamic-import": "^7.0.0", "@babel/preset-env": "^7.1.0", "@vitejs/plugin-vue-jsx": "^1.3.3", "@vue/babel-helper-vue-jsx-merge-props": "^1.2.1", "@vue/babel-preset-jsx": "^1.2.4", "add-asset-html-webpack-plugin": "^3.2.0", "autoprefixer": "^9.1.5", "babel-loader": "^8.0.4", "babel-plugin-component": "^1.1.1", "babel-plugin-transform-vite-meta-env": "^1.0.3", "chalk": "^3.0.0", "clean-webpack-plugin": "^0.1.19", "copy-webpack-plugin": "^4.5.3", "cross-env": "^7.0.3", "css-loader": "^1.0.0", "dotenv": "^10.0.0", "file-loader": "^2.0.0", "happypack": "^5.0.1", "html-webpack-plugin": "^4.5.2", "less": "^4.1.2", "less-loader": "^5.0.0", "mini-css-extract-plugin": "^1.6.2", "node-sass": "^4.9.3", "optimize-css-assets-webpack-plugin": "^5.0.1", "parallel-webpack": "^2.6.0", "postcss-import": "^11.1.0", "postcss-loader": "^2.1.6", "postcss-url": "^7.3.2", "progress-bar-webpack-plugin": "^2.1.0", "sass": "^1.49.0", "sass-loader": "^7.1.0", "style-loader": "^0.23.0", "thread-loader": "^3.0.4", "uglifyjs-webpack-plugin": "^2.0.1", "url-loader": "^1.1.1", "vite": "2.3.7", "vite-plugin-html": "^2.1.1", "vite-plugin-imp": "^2.0.11", "vite-plugin-pagedata": "^1.0.4", "vite-plugin-vue2": "^1.9.0", "vue-loader": "^15.4.2", "vue-template-compiler": "^2.5.17", "webpack": "^4.46.0", "webpack-cli": "^4.9.2", "webpack-dev-server": "^3.11.3", "webpack-merge": "^4.1.4" }, "dependencies": { "axios": "^0.24.0", "babel-polyfill": "^6.26.0", "canvas": "^2.9.0", "classnames": "^2.3.1", "deep-lu-trans": "^1.0.5", "element-ui": "^2.15.6", "enquire.js": "^2.1.6", "font-awesome": "^4.7.0", "hi-taskcenter": "^1.0.9", "hi-ui": "^1.1.1006", "jquery": "^3.6.0", "js-cookie": "^3.0.1", "js-md5": "^0.7.3", "js-pinyin": "^0.1.9", "lodash": "^4.17.11", "qrcodejs2": "0.0.2", "screenfull": "^6.0.0", "sortablejs": "^1.14.0", "v-clipboard": "^2.2.3", "vue": "^2.5.17", "vue-draggable-resizable": "^2.3.0", "vue-gemini-scrollbar": "^2.0.1", "vue-jstree": "^2.1.6", "vue-qr": "^3.2.4", "vue-router": "^3.0.1", "vuex": "^3.6.2", "zhc-birt-cmps": "^2.4.9", "zhc-birt-core": "^1.9.0" } }
{ "name": "hi-vui-template", "version": "1.1.9", "description": "A hi-vui-template project", "author": "zhcTeam", "scripts": { "rm:vite": "rimraf node_modules/.vite && rimraf node_modules/.cache", "pm2:start": "pm2 start processes.json", "dev": "vite --host", "build": "node build/copyBaseAssets.js && cross-env NODE_ENV=production node build/webpack.prod.conf.js", "build:modules": "cross-env NODE_ENV=production node build/webpack.prod.conf.js", "build1": "webpack --mode production --config build/webpack.prod.conf.js", "dll": "webpack --config build/webpack.dll.conf.js", "start": "webpack-dev-server --config build/webpack.dev.conf.js", "copyassets": "node build/copyBaseAssets.js" }, "devDependencies": { "@babel/core": "^7.1.2", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7", "@babel/plugin-proposal-optional-chaining": "^7.16.7", "@babel/plugin-syntax-dynamic-import": "^7.0.0", "@babel/preset-env": "^7.1.0", "@vitejs/plugin-vue-jsx": "^1.3.3", "@vue/babel-helper-vue-jsx-merge-props": "^1.2.1", "@vue/babel-preset-jsx": "^1.2.4", "add-asset-html-webpack-plugin": "^3.2.0", "autoprefixer": "^9.1.5", "babel-loader": "^8.0.4", "babel-plugin-component": "^1.1.1", "babel-plugin-transform-vite-meta-env": "^1.0.3", "chalk": "^5.0.0", "clean-webpack-plugin": "^0.1.19", "copy-webpack-plugin": "^4.5.3", "cross-env": "^7.0.3", "css-loader": "^1.0.0", "dotenv": "^10.0.0", "file-loader": "^2.0.0", "happypack": "^5.0.1", "html-webpack-plugin": "^4.5.2", "less": "^4.1.2", "less-loader": "^5.0.0", "mini-css-extract-plugin": "^1.6.2", "node-sass": "^4.9.3", "optimize-css-assets-webpack-plugin": "^5.0.1", "parallel-webpack": "^2.6.0", "postcss-import": "^11.1.0", "postcss-loader": "^2.1.6", "postcss-url": "^7.3.2", "progress-bar-webpack-plugin": "^2.1.0", "sass": "^1.49.0", "sass-loader": "^7.1.0", "style-loader": "^0.23.0", "thread-loader": "^3.0.4", "uglifyjs-webpack-plugin": "^2.0.1", "url-loader": "^1.1.1", "vite": "2.3.7", "vite-plugin-html": "^2.1.1", "vite-plugin-imp": "^2.0.11", "vite-plugin-pagedata": "^1.0.4", "vite-plugin-vue2": "^1.9.0", "vue-loader": "^15.4.2", "vue-template-compiler": "^2.5.17", "webpack": "^4.46.0", "webpack-cli": "^4.9.2", "webpack-dev-server": "^3.11.3", "webpack-merge": "^4.1.4" }, "dependencies": { "axios": "^0.24.0", "babel-polyfill": "^6.26.0", "canvas": "^2.9.0", "classnames": "^2.3.1", "deep-lu-trans": "^1.0.5", "element-ui": "^2.15.6", "enquire.js": "^2.1.6", "font-awesome": "^4.7.0", "hi-taskcenter": "^1.0.9", "hi-ui": "^1.1.1006", "jquery": "^3.6.0", "js-cookie": "^3.0.1", "js-md5": "^0.7.3", "js-pinyin": "^0.1.9", "lodash": "^4.17.11", "qrcodejs2": "0.0.2", "screenfull": "^6.0.0", "sortablejs": "^1.14.0", "v-clipboard": "^2.2.3", "vue": "^2.5.17", "vue-draggable-resizable": "^2.3.0", "vue-gemini-scrollbar": "^2.0.1", "vue-jstree": "^2.1.6", "vue-qr": "^3.2.4", "vue-router": "^3.0.1", "vuex": "^3.6.2", "zhc-birt-cmps": "^2.4.9", "zhc-birt-core": "^1.9.0" } }
Show line notes below