diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..a92f03f --- /dev/null +++ b/.env.development @@ -0,0 +1,4 @@ +VUE_CLI_BABEL_TRANSPILE_MODULES = true +NODE_ENV = 'development' +BASE_URL = '/' +VUE_APP_BASE_API = '' \ No newline at end of file diff --git a/package.json b/package.json index 2e80fb6..0df5212 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "dependencies": { "axios": "^0.19.0", "core-js": "2.6.5", + "js-cookie": "^2.2.1", "lib-flexible": "^0.3.2", "vant": "^2.2.5", "vue": "^2.6.10", @@ -28,12 +29,18 @@ "body-parser": "^1.19.0", "chalk": "^2.4.2", "chokidar": "^3.2.1", + "compression-webpack-plugin": "^3.0.0", "eslint": "^5.16.0", "eslint-plugin-vue": "^5.0.0", "mockjs": "^1.0.1-beta3", "postcss-pxtorem": "^4.0.1", "sass": "^1.18.0", "sass-loader": "^7.1.0", - "vue-template-compiler": "^2.6.10" + "script-ext-html-webpack-plugin": "^2.1.4", + "svg-sprite-loader": "^4.1.6", + "svgo": "^1.3.0", + "uglifyjs-webpack-plugin": "^2.2.0", + "vue-template-compiler": "^2.6.10", + "webpack-bundle-analyzer": "^3.5.2" } } diff --git a/public/index.html b/public/index.html index 7803be8..15e228d 100644 --- a/public/index.html +++ b/public/index.html @@ -5,6 +5,14 @@ + <% if (process.env.NODE_ENV === 'production') { %> <% for(var css of + htmlWebpackPlugin.options.cdn.css) { %> + + + <% } %> <% for(var js of htmlWebpackPlugin.options.cdn.js) { %> + + + <% } %> <% } %> vue-cli-h5 diff --git a/src/App.vue b/src/App.vue index d99595a..fa6d9f2 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,6 +1,7 @@ @@ -14,6 +15,7 @@ import { Button, Field } from 'vant' import { mapActions, mapMutations, mapGetters } from 'vuex' // createNamespacedHelpers import service from '@/utils/request' +import SvgIcon from 'components/SvgIcon' // const { mapActions } = createNamespacedHelpers('test') export default { @@ -25,7 +27,8 @@ export default { }, components: { [Button.name]: Button, - [Field.name]: Field + [Field.name]: Field, + SvgIcon }, computed: { ...mapGetters({ @@ -33,7 +36,6 @@ export default { }) }, mounted () { - console.log(process.env.NODE_ENV, 'process.env.NODE_ENV', 1+ process.env.VUE_APP_BASE_API, 'process.env.VUE_APP_BASE_API') // service.get('/article/list').then(res => { // console.log(res, 'regs', process.env.NODE_ENV) // }) diff --git a/vue.config.js b/vue.config.js index fd126c0..cbe0917 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,36 +1,41 @@ -const isProduction = process.env.NODE_ENV === 'production' +const path = require('path') +const CompressionWebpackPlugin = require('compression-webpack-plugin') +const UglifyjsWebpackPlugin = require('uglifyjs-webpack-plugin') +const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer') const port = process.env.port || process.env.npm_config_port || 8888 +const cdnDomian = './' // cdn域名,如果有cdn修改成对应的cdn +const name = 'h5Vue-cli' // page title +const IS_PRODUCTION = process.env.NODE_ENV === 'production' +const cdn = { + css: [], + js: [ + 'https://cdn.bootcss.com/vue/2.6.10/vue.min.js', + 'https://cdn.bootcss.com/vue-router/3.0.3/vue-router.min.js', + 'https://cdn.bootcss.com/vuex/3.0.1/vuex.min.js', + 'https://cdn.bootcss.com/axios/0.19.0-beta.1/axios.min.js', + 'https://cdn.bootcss.com/js-cookie/2.2.1/js.cookie.min.js' + ] +} + +const externals = { + vue: 'Vue', + 'vue-router': 'VueRouter', + vuex: 'Vuex', + axios: 'axios', + 'js-cookie': 'Cookies' +} + +function resolve (dir) { + return path.join(__dirname, dir) +} module.exports = { - chainWebpack: config => { - // 设置目录别名alias - config.resolve.alias - .set('assets', '@/assets') - .set('components', '@/components') - .set('views', '@/views') - .set('style', '@/style') - .set('api', '@/api') - .set('store', '@/store') - }, - css: { - // 是否使用css分离插件 ExtractTextPlugin - extract: !!isProduction, - // 开启 CSS source maps? - sourceMap: false, - // css预设器配置项 - // 启用 CSS modules for all css / pre-processor files. - modules: false, - loaderOptions: { - sass: { - data: '@import "style/_mixin.scss";@import "style/_variables.scss";' // 全局引入 - } - } - }, - lintOnSave: true, // default false - // 打包时不生成.map文件 + publicPath: IS_PRODUCTION ? cdnDomian : './', + outputDir: 'dist', + assetsDir: 'static', + lintOnSave: process.env.NODE_ENV === 'development', productionSourceMap: false, devServer: { - host: '0.0.0.0', port: port, open: true, overlay: { @@ -47,7 +52,146 @@ module.exports = { ['^' + process.env.VUE_APP_BASE_API]: '' } } + }, + after: require('./mock/mock-server.js') + }, + configureWebpack: { + // provide the app's title in webpack's name field, so that + // it can be accessed in index.html to inject the correct title. + name: name, + resolve: { + alias: { + '@': resolve('src'), + 'views': resolve('src/views'), + 'components': resolve('src/components'), + 'api': resolve('src/api'), + 'utils': resolve('src/utils'), + 'assets': resolve('src/assets'), + 'style': resolve('src/style') + } + } + }, + chainWebpack (config) { + config.plugins.delete('preload') // TODO: need test + config.plugins.delete('prefetch') // TODO: need test + + // set svg-sprite-loader + config.module + .rule('svg') + .exclude.add(resolve('src/icons')) + .end() + config.module + .rule('icons') + .test(/\.svg$/) + .include.add(resolve('src/icons')) + .end() + .use('svg-sprite-loader') + .loader('svg-sprite-loader') + .options({ + symbolId: 'icon-[name]' + }) + .end() + + // set preserveWhitespace + config.module + .rule('vue') + .use('vue-loader') + .loader('vue-loader') + .tap(options => { + options.compilerOptions.preserveWhitespace = true + return options + }) + .end() + + config + // https://webpack.js.org/configuration/devtool/#development + .when(process.env.NODE_ENV === 'development', + config => config.devtool('cheap-source-map') + ) + + config + .when(process.env.NODE_ENV !== 'development', + config => { + config + .plugin('ScriptExtHtmlWebpackPlugin') + .after('html') + .use('script-ext-html-webpack-plugin', [{ + // `runtime` must same as runtimeChunk name. default is `runtime` + inline: /runtime\..*\.js$/ + }]) + .end() + config + .optimization.splitChunks({ + chunks: 'all', + cacheGroups: { + libs: { + name: 'chunk-libs', + test: /[\\/]node_modules[\\/]/, + priority: 10, + chunks: 'initial' // only package third parties that are initially dependent + }, + commons: { + name: 'chunk-commons', + test: resolve('src/components'), // can customize your rules + minChunks: 3, // minimum common number + priority: 5, + reuseExistingChunk: true + } + } + }) + config.optimization.runtimeChunk('single') + } + ) + if (IS_PRODUCTION) { + config.plugin('analyzer').use(BundleAnalyzerPlugin) + config.plugin('html').tap(args => { + args[0].cdn = cdn + return args + }) + config.externals(externals) + config.plugin('html').tap(args => { + args[0].minify.minifyCSS = true // 压缩html中的css + return args + }) + // gzip需要nginx进行配合 + config + .plugin('compression') + .use(CompressionWebpackPlugin) + .tap(() => [ + { + test: /\.js$|\.html$|\.css/, // 匹配文件名 + threshold: 10240, // 超过10k进行压缩 + deleteOriginalAssets: false // 是否删除源文件 + } + ]) + config.optimization.minimizer([ + new UglifyjsWebpackPlugin({ + // 生产环境推荐关闭 sourcemap 防止源码泄漏 + // 服务端通过前端发送的行列,根据 sourcemap 转为源文件位置 + // sourceMap: true, + uglifyOptions: { + warnings: false, + compress: { + drop_console: true, + drop_debugger: true + } + } + }) + ]) + } + }, + css: { + // 是否使用css分离插件 ExtractTextPlugin + extract: !!IS_PRODUCTION, + // 开启 CSS source maps? + sourceMap: false, + // css预设器配置项 + // 启用 CSS modules for all css / pre-processor files. + modules: false, + loaderOptions: { + sass: { + data: '@import "style/_mixin.scss";@import "style/_variables.scss";@import "style/common.scss";' // 全局引入 + } } - // after: require('./mock/mock-server.js') } } diff --git a/yarn.lock b/yarn.lock index 4410650..73ee43e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1631,6 +1631,11 @@ bluebird@^3.1.1, bluebird@^3.5.1, bluebird@^3.5.5: resolved "https://registry.npm.taobao.org/bluebird/download/bluebird-3.5.5.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbluebird%2Fdownload%2Fbluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f" integrity sha1-qNCv1zJR7/u9X+OEp31zADwXpx8= +bluebird@^3.5.0: + version "3.7.0" + resolved "https://registry.npm.taobao.org/bluebird/download/bluebird-3.7.0.tgz#56a6a886e03f6ae577cffedeb524f8f2450293cf" + integrity sha1-VqaohuA/auV3z/7etST48kUCk88= + bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: version "4.11.8" resolved "https://registry.npm.taobao.org/bn.js/download/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" @@ -1677,7 +1682,7 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -braces@^2.3.1, braces@^2.3.2: +braces@^2.2.2, braces@^2.3.1, braces@^2.3.2: version "2.3.2" resolved "https://registry.npm.taobao.org/braces/download/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" integrity sha1-WXn9PxTNUxVl5fot8av/8d+u5yk= @@ -1831,6 +1836,26 @@ cacache@^10.0.4: unique-filename "^1.1.0" y18n "^4.0.0" +cacache@^11.2.0: + version "11.3.3" + resolved "https://registry.npm.taobao.org/cacache/download/cacache-11.3.3.tgz#8bd29df8c6a718a6ebd2d010da4d7972ae3bbadc" + integrity sha1-i9Kd+ManGKbr0tAQ2k15cq47utw= + dependencies: + bluebird "^3.5.5" + chownr "^1.1.1" + figgy-pudding "^3.5.1" + glob "^7.1.4" + graceful-fs "^4.1.15" + lru-cache "^5.1.1" + mississippi "^3.0.0" + mkdirp "^0.5.1" + move-concurrently "^1.0.1" + promise-inflight "^1.0.1" + rimraf "^2.6.3" + ssri "^6.0.1" + unique-filename "^1.1.1" + y18n "^4.0.0" + cacache@^12.0.2: version "12.0.3" resolved "https://registry.npm.taobao.org/cacache/download/cacache-12.0.3.tgz#be99abba4e1bf5df461cd5a2c1071fc432573390" @@ -2156,6 +2181,11 @@ clone@^1.0.2: resolved "https://registry.npm.taobao.org/clone/download/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= +clone@^2.1.1: + version "2.1.2" + resolved "https://registry.npm.taobao.org/clone/download/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" + integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= + co@^4.6.0: version "4.6.0" resolved "https://registry.npm.taobao.org/co/download/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" @@ -2233,6 +2263,11 @@ commander@2.17.x: resolved "https://registry.npm.taobao.org/commander/download/commander-2.17.1.tgz?cache=0&sync_timestamp=1569709401112&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" integrity sha1-vXerfebelCBc6sxy8XFtKfIKd78= +commander@2.20.0: + version "2.20.0" + resolved "https://registry.npm.taobao.org/commander/download/commander-2.20.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" + integrity sha1-1YuytcHuj4ew00ACfp6U4iLFpCI= + commander@^2.18.0, commander@^2.20.0: version "2.20.1" resolved "https://registry.npm.taobao.org/commander/download/commander-2.20.1.tgz?cache=0&sync_timestamp=1569709401112&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.20.1.tgz#3863ce3ca92d0831dcf2a102f5fb4b5926afd0f9" @@ -2260,6 +2295,18 @@ compressible@~2.0.16: dependencies: mime-db ">= 1.40.0 < 2" +compression-webpack-plugin@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/compression-webpack-plugin/download/compression-webpack-plugin-3.0.0.tgz#097d2e4d95c3a14cb5c8ed20899009ab5b9bbca0" + integrity sha1-CX0uTZXDoUy1yO0giZAJq1ubvKA= + dependencies: + cacache "^11.2.0" + find-cache-dir "^3.0.0" + neo-async "^2.5.0" + schema-utils "^1.0.0" + serialize-javascript "^1.4.0" + webpack-sources "^1.0.1" + compression@^1.7.4: version "1.7.4" resolved "https://registry.npm.taobao.org/compression/download/compression-1.7.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcompression%2Fdownload%2Fcompression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f" @@ -2738,6 +2785,11 @@ deep-is@~0.1.3: resolved "https://registry.npm.taobao.org/deep-is/download/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= +deepmerge@1.3.2: + version "1.3.2" + resolved "https://registry.npm.taobao.org/deepmerge/download/deepmerge-1.3.2.tgz#1663691629d4dbfe364fa12a2a4f0aa86aa3a050" + integrity sha1-FmNpFinU2/42T6EqKk8KqGqjoFA= + deepmerge@^1.5.2: version "1.5.2" resolved "https://registry.npm.taobao.org/deepmerge/download/deepmerge-1.5.2.tgz#10499d868844cdad4fee0842df8c7f6f0c95a753" @@ -2940,6 +2992,11 @@ domhandler@^2.3.0: dependencies: domelementtype "1" +domready@1.0.8: + version "1.0.8" + resolved "https://registry.npm.taobao.org/domready/download/domready-1.0.8.tgz#91f252e597b65af77e745ae24dd0185d5e26d58c" + integrity sha1-kfJS5Ze2Wvd+dFriTdAYXV4m1Yw= + domutils@1.5.1: version "1.5.1" resolved "https://registry.npm.taobao.org/domutils/download/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" @@ -3121,7 +3178,7 @@ escape-html@~1.0.3: resolved "https://registry.npm.taobao.org/escape-html/download/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: +escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescape-string-regexp%2Fdownload%2Fescape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= @@ -3551,7 +3608,7 @@ external-editor@^3.0.3: iconv-lite "^0.4.24" tmp "^0.0.33" -extglob@^2.0.4: +extglob@^2.0.2, extglob@^2.0.4: version "2.0.4" resolved "https://registry.npm.taobao.org/extglob/download/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" integrity sha1-rQD+TcYSqSMuhxhxHcXLWrAoVUM= @@ -3731,6 +3788,15 @@ find-cache-dir@^2.0.0, find-cache-dir@^2.1.0: make-dir "^2.0.0" pkg-dir "^3.0.0" +find-cache-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-3.0.0.tgz#cd4b7dd97b7185b7e17dbfe2d6e4115ee3eeb8fc" + integrity sha1-zUt92Xtxhbfhfb/i1uQRXuPuuPw= + dependencies: + commondir "^1.0.1" + make-dir "^3.0.0" + pkg-dir "^4.1.0" + find-up@^1.0.0: version "1.1.2" resolved "https://registry.npm.taobao.org/find-up/download/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" @@ -3753,6 +3819,14 @@ find-up@^3.0.0: dependencies: locate-path "^3.0.0" +find-up@^4.0.0: + version "4.1.0" + resolved "https://registry.npm.taobao.org/find-up/download/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha1-l6/n1s3AvFkoWEt8jXsW6KmqXRk= + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + flat-cache@^1.2.1: version "1.3.4" resolved "https://registry.npm.taobao.org/flat-cache/download/flat-cache-1.3.4.tgz#2c2ef77525cc2929007dfffa1dd314aa9c9dee6f" @@ -4148,7 +4222,7 @@ hash.js@^1.0.0, hash.js@^1.0.3: inherits "^2.0.3" minimalistic-assert "^1.0.1" -he@1.2.x, he@^1.1.0: +he@1.2.x, he@^1.1.0, he@^1.1.1: version "1.2.0" resolved "https://registry.npm.taobao.org/he/download/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha1-hK5l+n6vsWX922FWauFLrwVmTw8= @@ -4243,7 +4317,7 @@ html-webpack-plugin@^3.2.0: toposort "^1.0.0" util.promisify "1.0.0" -htmlparser2@^3.3.0: +htmlparser2@^3.3.0, htmlparser2@^3.8.3: version "3.10.1" resolved "https://registry.npm.taobao.org/htmlparser2/download/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" integrity sha1-vWedw/WYl7ajS7EHSchVu1OpOS8= @@ -4381,6 +4455,11 @@ ignore@^5.0.2: resolved "https://registry.npm.taobao.org/ignore/download/ignore-5.1.4.tgz#84b7b3dbe64552b6ef0eca99f6743dbec6d97adf" integrity sha1-hLez2+ZFUrbvDsqZ9nQ9vsbZet8= +image-size@^0.5.1: + version "0.5.5" + resolved "https://registry.npm.taobao.org/image-size/download/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c" + integrity sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w= + import-cwd@^2.0.0: version "2.1.0" resolved "https://registry.npm.taobao.org/import-cwd/download/import-cwd-2.1.0.tgz#aa6cf36e722761285cb371ec6519f53e2435b0a9" @@ -4749,7 +4828,7 @@ is-path-inside@^2.1.0: dependencies: path-is-inside "^1.0.2" -is-plain-obj@^1.0.0: +is-plain-obj@^1.0.0, is-plain-obj@^1.1: version "1.1.0" resolved "https://registry.npm.taobao.org/is-plain-obj/download/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= @@ -4827,7 +4906,7 @@ isexe@^2.0.0: resolved "https://registry.npm.taobao.org/isexe/download/isexe-2.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fisexe%2Fdownload%2Fisexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= -isobject@^2.0.0: +isobject@^2.0.0, isobject@^2.1.0: version "2.1.0" resolved "https://registry.npm.taobao.org/isobject/download/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= @@ -4854,6 +4933,11 @@ js-base64@^2.1.9: resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.5.1.tgz#1efa39ef2c5f7980bb1784ade4a8af2de3291121" integrity sha512-M7kLczedRMYX4L8Mdh4MzyAMM9O5osx+4FcOQuTvr3A9F2D9S5JXheN0ewNbrvK2UatkTRhL5ejGmGSjNMiZuw== +js-cookie@^2.2.1: + version "2.2.1" + resolved "https://registry.npm.taobao.org/js-cookie/download/js-cookie-2.2.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjs-cookie%2Fdownload%2Fjs-cookie-2.2.1.tgz#69e106dc5d5806894562902aa5baec3744e9b2b8" + integrity sha1-aeEG3F1YBolFYpAqpbrsN0Tpsrg= + js-levenshtein@^1.1.3: version "1.1.6" resolved "https://registry.npm.taobao.org/js-levenshtein/download/js-levenshtein-1.1.6.tgz#c6cee58eb3550372df8deb85fad5ce66ce01d59d" @@ -4994,7 +5078,7 @@ kind-of@^4.0.0: dependencies: is-buffer "^1.1.5" -kind-of@^5.0.0: +kind-of@^5.0.0, kind-of@^5.0.2: version "5.1.0" resolved "https://registry.npm.taobao.org/kind-of/download/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" integrity sha1-cpyR4thXt6QZofmqZWhcTDP1hF0= @@ -5102,6 +5186,13 @@ locate-path@^3.0.0: p-locate "^3.0.0" path-exists "^3.0.0" +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.npm.taobao.org/locate-path/download/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha1-Gvujlq/WdqbUJQTQpno6frn2KqA= + dependencies: + p-locate "^4.1.0" + lodash.defaultsdeep@^4.6.1: version "4.6.1" resolved "https://registry.npm.taobao.org/lodash.defaultsdeep/download/lodash.defaultsdeep-4.6.1.tgz#512e9bd721d272d94e3d3a63653fa17516741ca6" @@ -5191,6 +5282,13 @@ make-dir@^2.0.0: pify "^4.0.1" semver "^5.6.0" +make-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/make-dir/download/make-dir-3.0.0.tgz#1b5f39f6b9270ed33f9f054c5c0f84304989f801" + integrity sha1-G1859rknDtM/nwVMXA+EMEmJ+AE= + dependencies: + semver "^6.0.0" + mamacro@^0.0.3: version "0.0.3" resolved "https://registry.npm.taobao.org/mamacro/download/mamacro-0.0.3.tgz#ad2c9576197c9f1abf308d0787865bd975a3f3e4" @@ -5261,6 +5359,13 @@ merge-descriptors@1.0.1: resolved "https://registry.npm.taobao.org/merge-descriptors/download/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= +merge-options@1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/merge-options/download/merge-options-1.0.1.tgz#2a64b24457becd4e4dc608283247e94ce589aa32" + integrity sha1-KmSyRFe+zU5NxggoMkfpTOWJqjI= + dependencies: + is-plain-obj "^1.1" + merge-source-map@^1.1.0: version "1.1.0" resolved "https://registry.npm.taobao.org/merge-source-map/download/merge-source-map-1.1.0.tgz#2fdde7e6020939f70906a68f2d7ae685e4c8c646" @@ -5283,6 +5388,25 @@ methods@~1.1.2: resolved "https://registry.npm.taobao.org/methods/download/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= +micromatch@3.1.0: + version "3.1.0" + resolved "https://registry.npm.taobao.org/micromatch/download/micromatch-3.1.0.tgz#5102d4eaf20b6997d6008e3acfe1c44a3fa815e2" + integrity sha1-UQLU6vILaZfWAI46z+HESj+oFeI= + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.2.2" + define-property "^1.0.0" + extend-shallow "^2.0.1" + extglob "^2.0.2" + fragment-cache "^0.2.1" + kind-of "^5.0.2" + nanomatch "^1.2.1" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" resolved "https://registry.npm.taobao.org/micromatch/download/micromatch-3.1.10.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmicromatch%2Fdownload%2Fmicromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" @@ -5439,6 +5563,11 @@ mississippi@^3.0.0: stream-each "^1.1.0" through2 "^2.0.0" +mitt@1.1.2: + version "1.1.2" + resolved "https://registry.npm.taobao.org/mitt/download/mitt-1.1.2.tgz#380e61480d6a615b660f07abb60d51e0a4e4bed6" + integrity sha1-OA5hSA1qYVtmDwertg1R4KTkvtY= + mixin-deep@^1.2.0: version "1.3.2" resolved "https://registry.npm.taobao.org/mixin-deep/download/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" @@ -5456,7 +5585,7 @@ mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: mockjs@^1.0.1-beta3: version "1.0.1-beta3" - resolved "https://registry.yarnpkg.com/mockjs/-/mockjs-1.0.1-beta3.tgz#d234f3c27256397564f2c955142e891909537209" + resolved "https://registry.npm.taobao.org/mockjs/download/mockjs-1.0.1-beta3.tgz#d234f3c27256397564f2c955142e891909537209" integrity sha1-0jTzwnJWOXVk8slVFC6JGQlTcgk= dependencies: commander "*" @@ -5520,7 +5649,7 @@ nan@^2.12.1: resolved "https://registry.npm.taobao.org/nan/download/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" integrity sha1-eBj3IgJ7JFmobwKV1DTR/CM2xSw= -nanomatch@^1.2.9: +nanomatch@^1.2.1, nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.npm.taobao.org/nanomatch/download/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" integrity sha1-uHqKpPwN6P5r6IiVs4mD/yZb0Rk= @@ -5980,7 +6109,7 @@ p-limit@^1.0.0, p-limit@^1.1.0: dependencies: p-try "^1.0.0" -p-limit@^2.0.0: +p-limit@^2.0.0, p-limit@^2.2.0: version "2.2.1" resolved "https://registry.npm.taobao.org/p-limit/download/p-limit-2.2.1.tgz#aa07a788cc3151c939b5131f63570f0dd2009537" integrity sha1-qgeniMwxUck5tRMfY1cPDdIAlTc= @@ -6001,6 +6130,13 @@ p-locate@^3.0.0: dependencies: p-limit "^2.0.0" +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.npm.taobao.org/p-locate/download/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha1-o0KLtwiLOmApL2aRkni3wpetTwc= + dependencies: + p-limit "^2.2.0" + p-map@^2.0.0: version "2.1.0" resolved "https://registry.npm.taobao.org/p-map/download/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" @@ -6125,6 +6261,11 @@ path-exists@^3.0.0: resolved "https://registry.npm.taobao.org/path-exists/download/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.npm.taobao.org/path-exists/download/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha1-UTvb4tO5XXdi6METfvoZXGxhtbM= + path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.npm.taobao.org/path-is-absolute/download/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" @@ -6245,6 +6386,13 @@ pkg-dir@^3.0.0: dependencies: find-up "^3.0.0" +pkg-dir@^4.1.0: + version "4.2.0" + resolved "https://registry.npm.taobao.org/pkg-dir/download/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha1-8JkTPfft5CLoHR2ESCcO6z5CYfM= + dependencies: + find-up "^4.0.0" + pkg-up@^2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/pkg-up/download/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f" @@ -6529,6 +6677,13 @@ postcss-ordered-values@^4.1.2: postcss "^7.0.0" postcss-value-parser "^3.0.0" +postcss-prefix-selector@^1.6.0: + version "1.7.2" + resolved "https://registry.npm.taobao.org/postcss-prefix-selector/download/postcss-prefix-selector-1.7.2.tgz#3adeed903985734298f19d8f5e0b657f9d90d43c" + integrity sha1-Ot7tkDmFc0KY8Z2PXgtlf52Q1Dw= + dependencies: + postcss "^7.0.0" + postcss-pxtorem@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/postcss-pxtorem/-/postcss-pxtorem-4.0.1.tgz#9c64d0efe4885473cc1cb0305c6ffc3ebb45b1cd" @@ -6604,7 +6759,7 @@ postcss-value-parser@^4.0.0: resolved "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-4.0.2.tgz#482282c09a42706d1fc9a069b73f44ec08391dc9" integrity sha1-SCKCwJpCcG0fyaBptz9E7Ag5Hck= -postcss@^5.2.10: +postcss@^5.2.10, postcss@^5.2.17: version "5.2.18" resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.18.tgz#badfa1497d46244f6390f58b319830d9107853c5" integrity sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg== @@ -6632,6 +6787,44 @@ postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.5 source-map "^0.6.1" supports-color "^6.1.0" +posthtml-parser@^0.2.0, posthtml-parser@^0.2.1: + version "0.2.1" + resolved "https://registry.npm.taobao.org/posthtml-parser/download/posthtml-parser-0.2.1.tgz#35d530de386740c2ba24ff2eb2faf39ccdf271dd" + integrity sha1-NdUw3jhnQMK6JP8usvrznM3ycd0= + dependencies: + htmlparser2 "^3.8.3" + isobject "^2.1.0" + +posthtml-rename-id@^1.0: + version "1.0.11" + resolved "https://registry.npm.taobao.org/posthtml-rename-id/download/posthtml-rename-id-1.0.11.tgz#02281a1e4482aa3c8c30f798cf9a888e32d9275c" + integrity sha1-AigaHkSCqjyMMPeYz5qIjjLZJ1w= + dependencies: + escape-string-regexp "1.0.5" + +posthtml-render@^1.0.5, posthtml-render@^1.0.6: + version "1.1.5" + resolved "https://registry.npm.taobao.org/posthtml-render/download/posthtml-render-1.1.5.tgz#387934e85438a3de77085fbc7d264efb00bd0e0f" + integrity sha1-OHk06FQ4o953CF+8fSZO+wC9Dg8= + +posthtml-svg-mode@^1.0.3: + version "1.0.3" + resolved "https://registry.npm.taobao.org/posthtml-svg-mode/download/posthtml-svg-mode-1.0.3.tgz#abd554face81223cab0cb367e18e4efd2a4e74b0" + integrity sha1-q9VU+s6BIjyrDLNn4Y5O/SpOdLA= + dependencies: + merge-options "1.0.1" + posthtml "^0.9.2" + posthtml-parser "^0.2.1" + posthtml-render "^1.0.6" + +posthtml@^0.9.2: + version "0.9.2" + resolved "https://registry.npm.taobao.org/posthtml/download/posthtml-0.9.2.tgz?cache=0&sync_timestamp=1570793541877&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fposthtml%2Fdownload%2Fposthtml-0.9.2.tgz#f4c06db9f67b61fd17c4e256e7e3d9515bf726fd" + integrity sha1-9MBtufZ7Yf0XxOJW5+PZUVv3Jv0= + dependencies: + posthtml-parser "^0.2.0" + posthtml-render "^1.0.5" + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.npm.taobao.org/prelude-ls/download/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -6770,6 +6963,14 @@ qs@~6.5.2: resolved "https://registry.npm.taobao.org/qs/download/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" integrity sha1-yzroBuh0BERYTvFUzo7pjUA/PjY= +query-string@^4.3.2: + version "4.3.4" + resolved "https://registry.npm.taobao.org/query-string/download/query-string-4.3.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fquery-string%2Fdownload%2Fquery-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb" + integrity sha1-u7aTucqRXCMlFbIosaArYJBD2+s= + dependencies: + object-assign "^4.1.0" + strict-uri-encode "^1.0.0" + query-string@^5.0.1: version "5.1.1" resolved "https://registry.npm.taobao.org/query-string/download/query-string-5.1.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fquery-string%2Fdownload%2Fquery-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" @@ -7277,6 +7478,13 @@ schema-utils@^1.0.0: ajv-errors "^1.0.0" ajv-keywords "^3.1.0" +script-ext-html-webpack-plugin@^2.1.4: + version "2.1.4" + resolved "https://registry.npm.taobao.org/script-ext-html-webpack-plugin/download/script-ext-html-webpack-plugin-2.1.4.tgz#7c309354e310bf78523e1b84ca96fd374ceb9880" + integrity sha1-fDCTVOMQv3hSPhuEypb9N0zrmIA= + dependencies: + debug "^4.1.1" + select-hose@^2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/select-hose/download/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" @@ -7852,12 +8060,55 @@ supports-color@^6.1.0: dependencies: has-flag "^3.0.0" +svg-baker-runtime@1.4.1: + version "1.4.1" + resolved "https://registry.npm.taobao.org/svg-baker-runtime/download/svg-baker-runtime-1.4.1.tgz#d3f77dffdf1f1a8b8f1e84ef67d2c1b53d60d770" + integrity sha1-0/d9/98fGouPHoTvZ9LBtT1g13A= + dependencies: + deepmerge "1.3.2" + mitt "1.1.2" + svg-baker "^1.4.0" + +svg-baker@^1.4.0, svg-baker@^1.4.1: + version "1.5.0" + resolved "https://registry.npm.taobao.org/svg-baker/download/svg-baker-1.5.0.tgz#e94e75523d9303e9a2b3448987080d966cb90af4" + integrity sha1-6U51Uj2TA+mis0SJhwgNlmy5CvQ= + dependencies: + bluebird "^3.5.0" + clone "^2.1.1" + he "^1.1.1" + image-size "^0.5.1" + loader-utils "^1.1.0" + merge-options "1.0.1" + micromatch "3.1.0" + postcss "^5.2.17" + postcss-prefix-selector "^1.6.0" + posthtml-rename-id "^1.0" + posthtml-svg-mode "^1.0.3" + query-string "^4.3.2" + traverse "^0.6.6" + +svg-sprite-loader@^4.1.6: + version "4.1.6" + resolved "https://registry.npm.taobao.org/svg-sprite-loader/download/svg-sprite-loader-4.1.6.tgz#ca03d51201e326c1c018389c81d5b0eb78dc01de" + integrity sha1-ygPVEgHjJsHAGDicgdWw63jcAd4= + dependencies: + bluebird "^3.5.0" + deepmerge "1.3.2" + domready "1.0.8" + escape-string-regexp "1.0.5" + html-webpack-plugin "^3.2.0" + loader-utils "^1.1.0" + svg-baker "^1.4.1" + svg-baker-runtime "1.4.1" + url-slug "2.0.0" + svg-tags@^1.0.0: version "1.0.0" resolved "https://registry.npm.taobao.org/svg-tags/download/svg-tags-1.0.0.tgz#58f71cee3bd519b59d4b2a843b6c7de64ac04764" integrity sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q= -svgo@^1.0.0: +svgo@^1.0.0, svgo@^1.3.0: version "1.3.0" resolved "https://registry.npm.taobao.org/svgo/download/svgo-1.3.0.tgz?cache=0&sync_timestamp=1563122957434&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsvgo%2Fdownload%2Fsvgo-1.3.0.tgz#bae51ba95ded9a33a36b7c46ce9c359ae9154313" integrity sha1-uuUbqV3tmjOja3xGzpw1mukVQxM= @@ -8073,6 +8324,11 @@ tough-cookie@~2.4.3: psl "^1.1.24" punycode "^1.4.1" +traverse@^0.6.6: + version "0.6.6" + resolved "https://registry.npm.taobao.org/traverse/download/traverse-0.6.6.tgz#cbdf560fd7b9af632502fed40f918c157ea97137" + integrity sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc= + tryer@^1.0.1: version "1.0.1" resolved "https://registry.npm.taobao.org/tryer/download/tryer-1.0.1.tgz#f2c85406800b9b0f74c9f7465b81eaad241252f8" @@ -8133,6 +8389,29 @@ uglify-js@3.4.x: commander "~2.19.0" source-map "~0.6.1" +uglify-js@^3.6.0: + version "3.6.1" + resolved "https://registry.npm.taobao.org/uglify-js/download/uglify-js-3.6.1.tgz#ae7688c50e1bdcf2f70a0e162410003cf9798311" + integrity sha1-rnaIxQ4b3PL3Cg4WJBAAPPl5gxE= + dependencies: + commander "2.20.0" + source-map "~0.6.1" + +uglifyjs-webpack-plugin@^2.2.0: + version "2.2.0" + resolved "https://registry.npm.taobao.org/uglifyjs-webpack-plugin/download/uglifyjs-webpack-plugin-2.2.0.tgz#e75bc80e7f1937f725954c9b4c5a1e967ea9d0d7" + integrity sha1-51vIDn8ZN/cllUybTFoeln6p0Nc= + dependencies: + cacache "^12.0.2" + find-cache-dir "^2.1.0" + is-wsl "^1.1.0" + schema-utils "^1.0.0" + serialize-javascript "^1.7.0" + source-map "^0.6.1" + uglify-js "^3.6.0" + webpack-sources "^1.4.0" + worker-farm "^1.7.0" + unicode-canonical-property-names-ecmascript@^1.0.4: version "1.0.4" resolved "https://registry.npm.taobao.org/unicode-canonical-property-names-ecmascript/download/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" @@ -8156,6 +8435,11 @@ unicode-property-aliases-ecmascript@^1.0.4: resolved "https://registry.npm.taobao.org/unicode-property-aliases-ecmascript/download/unicode-property-aliases-ecmascript-1.0.5.tgz#a9cc6cc7ce63a0a3023fc99e341b94431d405a57" integrity sha1-qcxsx85joKMCP8meNBuUQx1AWlc= +unidecode@0.1.8: + version "0.1.8" + resolved "https://registry.npm.taobao.org/unidecode/download/unidecode-0.1.8.tgz#efbb301538bc45246a9ac8c559d72f015305053e" + integrity sha1-77swFTi8RSRqmsjFWdcvAVMFBT4= + union-value@^1.0.0: version "1.0.1" resolved "https://registry.npm.taobao.org/union-value/download/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" @@ -8252,6 +8536,13 @@ url-parse@^1.4.3: querystringify "^2.1.1" requires-port "^1.0.0" +url-slug@2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/url-slug/download/url-slug-2.0.0.tgz#a789d5aed4995c0d95af33377ad1d5c68d4d7027" + integrity sha1-p4nVrtSZXA2VrzM3etHVxo1NcCc= + dependencies: + unidecode "0.1.8" + url@^0.11.0: version "0.11.0" resolved "https://registry.npm.taobao.org/url/download/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" @@ -8453,7 +8744,7 @@ wcwidth@^1.0.1: dependencies: defaults "^1.0.3" -webpack-bundle-analyzer@^3.3.0: +webpack-bundle-analyzer@^3.3.0, webpack-bundle-analyzer@^3.5.2: version "3.5.2" resolved "https://registry.npm.taobao.org/webpack-bundle-analyzer/download/webpack-bundle-analyzer-3.5.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-bundle-analyzer%2Fdownload%2Fwebpack-bundle-analyzer-3.5.2.tgz#ac02834f4b31de8e27d71e6c7a612301ebddb79f" integrity sha1-rAKDT0sx3o4n1x5semEjAevdt58= @@ -8545,7 +8836,7 @@ webpack-merge@^4.2.1: dependencies: lodash "^4.17.15" -webpack-sources@^1.1.0, webpack-sources@^1.4.0, webpack-sources@^1.4.1: +webpack-sources@^1.0.1, webpack-sources@^1.1.0, webpack-sources@^1.4.0, webpack-sources@^1.4.1: version "1.4.3" resolved "https://registry.npm.taobao.org/webpack-sources/download/webpack-sources-1.4.3.tgz?cache=0&sync_timestamp=1568302837530&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-sources%2Fdownload%2Fwebpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" integrity sha1-7t2OwLko+/HL/plOItLYkPMwqTM=