From f06771d608ae2586d33de9217f3061a907605f56 Mon Sep 17 00:00:00 2001 From: aorz Date: Mon, 16 Jul 2018 19:53:44 +0800 Subject: [PATCH 01/12] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E5=88=86?= =?UTF-8?q?=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/build/webpack.base.conf.js | 32 +++++++++++++++++++++-------- template/build/webpack.dev.conf.js | 12 ++--------- template/build/webpack.prod.conf.js | 14 +++---------- template/src/main.js | 14 ------------- template/src/main.json | 13 ++++++++++++ 5 files changed, 41 insertions(+), 44 deletions(-) create mode 100644 template/src/main.json diff --git a/template/build/webpack.base.conf.js b/template/build/webpack.base.conf.js index 9a2591c..4c98505 100644 --- a/template/build/webpack.base.conf.js +++ b/template/build/webpack.base.conf.js @@ -5,22 +5,35 @@ var config = require('../config') var vueLoaderConfig = require('./vue-loader.conf') var MpvuePlugin = require('webpack-mpvue-asset-plugin') var glob = require('glob') +var CopyWebpackPlugin = require('copy-webpack-plugin') +var configFilesArray = [] function resolve (dir) { return path.join(__dirname, '..', dir) } function getEntry (rootSrc, pattern) { - var files = glob.sync(path.resolve(rootSrc, pattern)) - return files.reduce((res, file) => { - var info = path.parse(file) - var key = info.dir.slice(rootSrc.length + 1) + '/' + info.name - res[key] = path.resolve(file) - return res - }, {}) + var map = {}; + glob.sync(rootSrc + '/pages/**/main.js') + .forEach(file => { + var key = file.replace(rootSrc + '/', '').replace('.js', ''); + map[key] = file; + }) + glob.sync(rootSrc + '/pages/**/main.json') + .forEach(file => { + configFilesArray.push({ + from: file, + to: file.replace(rootSrc + '/', '') + }) + }) + return map; } -const appEntry = { app: resolve('./src/main.js') } +const appEntry = { 'app': resolve('./src/main.js')} +configFilesArray.push({ + from: resolve('./src/main.json'), + to: 'app.json' +}) const pagesEntry = getEntry(resolve('./src'), 'pages/**/main.js') const entry = Object.assign({}, appEntry, pagesEntry) @@ -108,6 +121,7 @@ module.exports = { ] }, plugins: [ - new MpvuePlugin() + new MpvuePlugin(), + new CopyWebpackPlugin(configFilesArray) ] } diff --git a/template/build/webpack.dev.conf.js b/template/build/webpack.dev.conf.js index 9fb3ebb..726b483 100644 --- a/template/build/webpack.dev.conf.js +++ b/template/build/webpack.dev.conf.js @@ -53,7 +53,7 @@ module.exports = merge(baseWebpackConfig, { } }), new webpack.optimize.CommonsChunkPlugin({ - name: 'vendor', + name: 'common/vendor', minChunks: function (module, count) { // any required modules inside node_modules are extracted to vendor return ( @@ -64,17 +64,9 @@ module.exports = merge(baseWebpackConfig, { } }), new webpack.optimize.CommonsChunkPlugin({ - name: 'manifest', + name: 'common/manifest', chunks: ['vendor'] }), - // copy custom static assets - new CopyWebpackPlugin([ - { - from: path.resolve(__dirname, '../static'), - to: config.build.assetsSubDirectory, - ignore: ['.*'] - } - ]), // https://github.com/glenjamin/webpack-hot-middleware#installation--usage // new webpack.HotModuleReplacementPlugin(), diff --git a/template/build/webpack.prod.conf.js b/template/build/webpack.prod.conf.js index f7df71d..3ada2b8 100644 --- a/template/build/webpack.prod.conf.js +++ b/template/build/webpack.prod.conf.js @@ -72,7 +72,7 @@ var webpackConfig = merge(baseWebpackConfig, { new webpack.HashedModuleIdsPlugin(), // split vendor js into its own file new webpack.optimize.CommonsChunkPlugin({ - name: 'vendor', + name: 'common/vendor', minChunks: function (module, count) { // any required modules inside node_modules are extracted to vendor return ( @@ -86,16 +86,8 @@ var webpackConfig = merge(baseWebpackConfig, { // prevent vendor hash from being updated whenever app bundle is updated new webpack.optimize.CommonsChunkPlugin({ name: 'manifest', - chunks: ['vendor'] - }), - // copy custom static assets - new CopyWebpackPlugin([ - { - from: path.resolve(__dirname, '../static'), - to: config.build.assetsSubDirectory, - ignore: ['.*'] - } - ]) + chunks: ['common/vendor'] + }) ] }) diff --git a/template/src/main.js b/template/src/main.js index 2479283..4f7d478 100644 --- a/template/src/main.js +++ b/template/src/main.js @@ -10,17 +10,3 @@ App.mpType = 'app'{{#if_eq lintConfig "airbnb"}};{{/if_eq}} const app = new Vue(App){{#if_eq lintConfig "airbnb"}};{{/if_eq}} app.$mount(){{#if_eq lintConfig "airbnb"}};{{/if_eq}} - -export default { - // 这个字段走 app.json - config: { - // 页面前带有 ^ 符号的,会被编译成首页,其他页面可以选填,我们会自动把 webpack entry 里面的入口页面加进去 - pages: ['pages/logs/main', '^pages/index/main'], - window: { - backgroundTextStyle: 'light', - navigationBarBackgroundColor: '#fff', - navigationBarTitleText: 'WeChat', - navigationBarTextStyle: 'black'{{#if_eq lintConfig "airbnb"}},{{/if_eq}} - }{{#if_eq lintConfig "airbnb"}},{{/if_eq}} - }{{#if_eq lintConfig "airbnb"}},{{/if_eq}} -}{{#if_eq lintConfig "airbnb"}};{{/if_eq}} diff --git a/template/src/main.json b/template/src/main.json new file mode 100644 index 0000000..26a40e4 --- /dev/null +++ b/template/src/main.json @@ -0,0 +1,13 @@ +{ + "pages": [ + "pages/index/main", + "pages/counter/main", + "pages/logs/main" + ], + "window": { + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#fff", + "navigationBarTitleText": "WeChat", + "navigationBarTextStyle": "black" + } +} From af08680776e5ce3ec0412d63b92712e8586a999c Mon Sep 17 00:00:00 2001 From: aorz Date: Mon, 16 Jul 2018 21:20:55 +0800 Subject: [PATCH 02/12] =?UTF-8?q?fix:=20=E7=94=9F=E6=88=90=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/build/webpack.dev.conf.js | 12 ++++++------ template/build/webpack.prod.conf.js | 12 ++++++------ template/config/index.js | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/template/build/webpack.dev.conf.js b/template/build/webpack.dev.conf.js index 726b483..4f359ef 100644 --- a/template/build/webpack.dev.conf.js +++ b/template/build/webpack.dev.conf.js @@ -29,10 +29,10 @@ module.exports = merge(baseWebpackConfig, { devtool: '#source-map', output: { path: config.build.assetsRoot, - // filename: utils.assetsPath('js/[name].[chunkhash].js'), - // chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') - filename: utils.assetsPath('js/[name].js'), - chunkFilename: utils.assetsPath('js/[id].js') + // filename: utils.assetsPath('[name].[chunkhash].js'), + // chunkFilename: utils.assetsPath('[id].[chunkhash].js') + filename: utils.assetsPath('[name].js'), + chunkFilename: utils.assetsPath('[id].js') }, plugins: [ new webpack.DefinePlugin({ @@ -42,8 +42,8 @@ module.exports = merge(baseWebpackConfig, { // copy from ./webpack.prod.conf.js // extract css into its own file new ExtractTextPlugin({ - // filename: utils.assetsPath('css/[name].[contenthash].css') - filename: utils.assetsPath('css/[name].wxss') + // filename: utils.assetsPath('[name].[contenthash].css') + filename: utils.assetsPath('[name].wxss') }), // Compress extracted CSS. We are using this plugin so that possible // duplicated CSS from different components can be deduped. diff --git a/template/build/webpack.prod.conf.js b/template/build/webpack.prod.conf.js index 3ada2b8..992e665 100644 --- a/template/build/webpack.prod.conf.js +++ b/template/build/webpack.prod.conf.js @@ -24,10 +24,10 @@ var webpackConfig = merge(baseWebpackConfig, { devtool: config.build.productionSourceMap ? '#source-map' : false, output: { path: config.build.assetsRoot, - // filename: utils.assetsPath('js/[name].[chunkhash].js'), - // chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') - filename: utils.assetsPath('js/[name].js'), - chunkFilename: utils.assetsPath('js/[id].js') + // filename: utils.assetsPath('[name].[chunkhash].js'), + // chunkFilename: utils.assetsPath('[id].[chunkhash].js') + filename: utils.assetsPath('[name].js'), + chunkFilename: utils.assetsPath('[id].js') }, plugins: [ // http://vuejs.github.io/vue-loader/en/workflow/production.html @@ -39,8 +39,8 @@ var webpackConfig = merge(baseWebpackConfig, { }), // extract css into its own file new ExtractTextPlugin({ - // filename: utils.assetsPath('css/[name].[contenthash].css') - filename: utils.assetsPath('css/[name].wxss') + // filename: utils.assetsPath('[name].[contenthash].css') + filename: utils.assetsPath('[name].wxss') }), // Compress extracted CSS. We are using this plugin so that possible // duplicated CSS from different components can be deduped. diff --git a/template/config/index.js b/template/config/index.js index d288fc2..5678f57 100644 --- a/template/config/index.js +++ b/template/config/index.js @@ -6,7 +6,7 @@ module.exports = { env: require('./prod.env'), index: path.resolve(__dirname, '../dist/index.html'), assetsRoot: path.resolve(__dirname, '../dist'), - assetsSubDirectory: 'static', + assetsSubDirectory: '', assetsPublicPath: '/', productionSourceMap: false, // Gzip off by default as many popular static hosts such as @@ -26,7 +26,7 @@ module.exports = { port: 8080, // 在小程序开发者工具中不需要自动打开浏览器 autoOpenBrowser: false, - assetsSubDirectory: 'static', + assetsSubDirectory: '', assetsPublicPath: '/', proxyTable: {}, // CSS Sourcemaps off by default because relative paths are "buggy" From f7c1d572df87293b31c44c3f5ddeac694d263910 Mon Sep 17 00:00:00 2001 From: aorz Date: Mon, 16 Jul 2018 21:51:36 +0800 Subject: [PATCH 03/12] =?UTF-8?q?fix:=20common/manifest=20=E7=94=9F?= =?UTF-8?q?=E6=88=90=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/build/webpack.base.conf.js | 4 ++-- template/build/webpack.dev.conf.js | 2 +- template/build/webpack.prod.conf.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/template/build/webpack.base.conf.js b/template/build/webpack.base.conf.js index 4c98505..2b761cb 100644 --- a/template/build/webpack.base.conf.js +++ b/template/build/webpack.base.conf.js @@ -12,7 +12,7 @@ function resolve (dir) { return path.join(__dirname, '..', dir) } -function getEntry (rootSrc, pattern) { +function getEntry (rootSrc) { var map = {}; glob.sync(rootSrc + '/pages/**/main.js') .forEach(file => { @@ -29,7 +29,7 @@ function getEntry (rootSrc, pattern) { return map; } -const appEntry = { 'app': resolve('./src/main.js')} +const appEntry = { app: resolve('./src/main.js') } configFilesArray.push({ from: resolve('./src/main.json'), to: 'app.json' diff --git a/template/build/webpack.dev.conf.js b/template/build/webpack.dev.conf.js index 4f359ef..af13377 100644 --- a/template/build/webpack.dev.conf.js +++ b/template/build/webpack.dev.conf.js @@ -65,7 +65,7 @@ module.exports = merge(baseWebpackConfig, { }), new webpack.optimize.CommonsChunkPlugin({ name: 'common/manifest', - chunks: ['vendor'] + chunks: ['common/vendor'] }), // https://github.com/glenjamin/webpack-hot-middleware#installation--usage diff --git a/template/build/webpack.prod.conf.js b/template/build/webpack.prod.conf.js index 992e665..14c5c72 100644 --- a/template/build/webpack.prod.conf.js +++ b/template/build/webpack.prod.conf.js @@ -85,7 +85,7 @@ var webpackConfig = merge(baseWebpackConfig, { // extract webpack runtime and module manifest to its own file in order to // prevent vendor hash from being updated whenever app bundle is updated new webpack.optimize.CommonsChunkPlugin({ - name: 'manifest', + name: 'common/manifest', chunks: ['common/vendor'] }) ] From 58d8976f4b89c6fabf6a8eb198a2f9f8e94d8db6 Mon Sep 17 00:00:00 2001 From: aorz Date: Fri, 20 Jul 2018 17:49:12 +0800 Subject: [PATCH 04/12] =?UTF-8?q?fix:=20win=20=E8=B7=AF=E5=BE=84=E5=85=BC?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/build/webpack.base.conf.js | 7 ++++--- template/package.json | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/template/build/webpack.base.conf.js b/template/build/webpack.base.conf.js index 2b761cb..0dcc82b 100644 --- a/template/build/webpack.base.conf.js +++ b/template/build/webpack.base.conf.js @@ -7,6 +7,7 @@ var MpvuePlugin = require('webpack-mpvue-asset-plugin') var glob = require('glob') var CopyWebpackPlugin = require('copy-webpack-plugin') var configFilesArray = [] +var relative = require('relative') function resolve (dir) { return path.join(__dirname, '..', dir) @@ -16,14 +17,14 @@ function getEntry (rootSrc) { var map = {}; glob.sync(rootSrc + '/pages/**/main.js') .forEach(file => { - var key = file.replace(rootSrc + '/', '').replace('.js', ''); - map[key] = file; + var key = relative(rootSrc, file).replace('.js', ''); + map[key] = file; }) glob.sync(rootSrc + '/pages/**/main.json') .forEach(file => { configFilesArray.push({ from: file, - to: file.replace(rootSrc + '/', '') + to: relative(rootSrc, file) }) }) return map; diff --git a/template/package.json b/template/package.json index 175d17d..450e7fb 100644 --- a/template/package.json +++ b/template/package.json @@ -28,6 +28,7 @@ "babel-core": "^6.22.1", "glob": "^7.1.2", "webpack-mpvue-asset-plugin": "^0.0.2", + "relative": "^3.0.2", {{#lint}} "babel-eslint": "^8.2.3", {{/lint}} From 5cb40ca7a194fa17164b6ef8559f5274c572f91c Mon Sep 17 00:00:00 2001 From: aorz Date: Fri, 20 Jul 2018 20:32:06 +0800 Subject: [PATCH 05/12] update: version --- template/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/template/package.json b/template/package.json index 450e7fb..488d639 100644 --- a/template/package.json +++ b/template/package.json @@ -18,7 +18,7 @@ "vuex": "^3.0.1"{{/vuex}} }, "devDependencies": { - "mpvue-loader": "^1.0.13", + "mpvue-loader": "^1.1.0", "mpvue-webpack-target": "^1.0.0", "mpvue-template-compiler": "^1.0.11", "portfinder": "^1.0.13", @@ -27,7 +27,7 @@ "px2rpx-loader": "^0.1.10", "babel-core": "^6.22.1", "glob": "^7.1.2", - "webpack-mpvue-asset-plugin": "^0.0.2", + "webpack-mpvue-asset-plugin": "^0.1.0", "relative": "^3.0.2", {{#lint}} "babel-eslint": "^8.2.3", From 98b14a560e88206a1a9327b4592a631084b61a39 Mon Sep 17 00:00:00 2001 From: aorz Date: Mon, 23 Jul 2018 11:37:43 +0800 Subject: [PATCH 06/12] =?UTF-8?q?fix:=20=E5=9B=BE=E7=89=87=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E5=A4=84=E7=90=86=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/build/webpack.base.conf.js | 9 ++++++++- template/package.json | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/template/build/webpack.base.conf.js b/template/build/webpack.base.conf.js index 0dcc82b..60a68a3 100644 --- a/template/build/webpack.base.conf.js +++ b/template/build/webpack.base.conf.js @@ -123,6 +123,13 @@ module.exports = { }, plugins: [ new MpvuePlugin(), - new CopyWebpackPlugin(configFilesArray) + new CopyWebpackPlugin(configFilesArray), + new CopyWebpackPlugin([ + { + from: path.resolve(__dirname, '../static'), + to: path.resolve(__dirname, '../dist/static'), + ignore: ['.*'] + } + ]) ] } diff --git a/template/package.json b/template/package.json index 488d639..0d5d31c 100644 --- a/template/package.json +++ b/template/package.json @@ -18,7 +18,7 @@ "vuex": "^3.0.1"{{/vuex}} }, "devDependencies": { - "mpvue-loader": "^1.1.0", + "mpvue-loader": "^1.1.1-rc.1", "mpvue-webpack-target": "^1.0.0", "mpvue-template-compiler": "^1.0.11", "portfinder": "^1.0.13", From 8df869fa61f8457bba5f53e6e145172cf5ee7a50 Mon Sep 17 00:00:00 2001 From: aorz Date: Mon, 23 Jul 2018 12:23:27 +0800 Subject: [PATCH 07/12] update: mpvue-loader version --- template/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/package.json b/template/package.json index 0d5d31c..695cf8a 100644 --- a/template/package.json +++ b/template/package.json @@ -18,7 +18,7 @@ "vuex": "^3.0.1"{{/vuex}} }, "devDependencies": { - "mpvue-loader": "^1.1.1-rc.1", + "mpvue-loader": "^1.1.1-rc.2", "mpvue-webpack-target": "^1.0.0", "mpvue-template-compiler": "^1.0.11", "portfinder": "^1.0.13", From a838ba010dd43961cfbbac3108d9e01e1d187ab2 Mon Sep 17 00:00:00 2001 From: aorz Date: Tue, 24 Jul 2018 20:27:38 +0800 Subject: [PATCH 08/12] update: version --- template/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/template/package.json b/template/package.json index 695cf8a..d3b6f45 100644 --- a/template/package.json +++ b/template/package.json @@ -18,7 +18,7 @@ "vuex": "^3.0.1"{{/vuex}} }, "devDependencies": { - "mpvue-loader": "^1.1.1-rc.2", + "mpvue-loader": "^1.1.1-rc.4", "mpvue-webpack-target": "^1.0.0", "mpvue-template-compiler": "^1.0.11", "portfinder": "^1.0.13", @@ -27,7 +27,7 @@ "px2rpx-loader": "^0.1.10", "babel-core": "^6.22.1", "glob": "^7.1.2", - "webpack-mpvue-asset-plugin": "^0.1.0", + "webpack-mpvue-asset-plugin": "^0.1.1", "relative": "^3.0.2", {{#lint}} "babel-eslint": "^8.2.3", From de81cb35110e731d275ad4b87d3320f3eb4a2bc2 Mon Sep 17 00:00:00 2001 From: null <6347990+aOrz@users.noreply.github.com> Date: Tue, 24 Jul 2018 23:53:40 +0800 Subject: [PATCH 09/12] Update package.json --- template/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/package.json b/template/package.json index d3b6f45..76dccc1 100644 --- a/template/package.json +++ b/template/package.json @@ -18,7 +18,7 @@ "vuex": "^3.0.1"{{/vuex}} }, "devDependencies": { - "mpvue-loader": "^1.1.1-rc.4", + "mpvue-loader": "^1.1.2-rc.4", "mpvue-webpack-target": "^1.0.0", "mpvue-template-compiler": "^1.0.11", "portfinder": "^1.0.13", From 3563d91e161c50e86e5d2d1f66a70be39c72735d Mon Sep 17 00:00:00 2001 From: aorz Date: Fri, 27 Jul 2018 11:10:59 +0800 Subject: [PATCH 10/12] =?UTF-8?q?fix:=20win=20=E4=B8=8B=20dev=20=E4=B8=8D?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/build/webpack.base.conf.js | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/template/build/webpack.base.conf.js b/template/build/webpack.base.conf.js index 60a68a3..a564a80 100644 --- a/template/build/webpack.base.conf.js +++ b/template/build/webpack.base.conf.js @@ -6,7 +6,6 @@ var vueLoaderConfig = require('./vue-loader.conf') var MpvuePlugin = require('webpack-mpvue-asset-plugin') var glob = require('glob') var CopyWebpackPlugin = require('copy-webpack-plugin') -var configFilesArray = [] var relative = require('relative') function resolve (dir) { @@ -20,21 +19,10 @@ function getEntry (rootSrc) { var key = relative(rootSrc, file).replace('.js', ''); map[key] = file; }) - glob.sync(rootSrc + '/pages/**/main.json') - .forEach(file => { - configFilesArray.push({ - from: file, - to: relative(rootSrc, file) - }) - }) return map; } const appEntry = { app: resolve('./src/main.js') } -configFilesArray.push({ - from: resolve('./src/main.json'), - to: 'app.json' -}) const pagesEntry = getEntry(resolve('./src'), 'pages/**/main.js') const entry = Object.assign({}, appEntry, pagesEntry) @@ -123,7 +111,12 @@ module.exports = { }, plugins: [ new MpvuePlugin(), - new CopyWebpackPlugin(configFilesArray), + new CopyWebpackPlugin([{ + from: '**/*.json', + to: '' + }], { + context: 'src/' + }), new CopyWebpackPlugin([ { from: path.resolve(__dirname, '../static'), From 1a363f8bee911bbc26809f8134946eaf5c02029a Mon Sep 17 00:00:00 2001 From: aorz Date: Sat, 28 Jul 2018 23:40:11 +0800 Subject: [PATCH 11/12] rename: app.json --- template/src/{main.json => app.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename template/src/{main.json => app.json} (100%) diff --git a/template/src/main.json b/template/src/app.json similarity index 100% rename from template/src/main.json rename to template/src/app.json From 7c6dd7e41b1d6649eff95f036ce25f3ba60aaf57 Mon Sep 17 00:00:00 2001 From: aorz Date: Fri, 10 Aug 2018 17:25:51 +0800 Subject: [PATCH 12/12] update: mpvue-loader version --- template/package.json | 2 +- template/src/pages/logs/main.js | 6 ------ template/src/pages/logs/main.json | 3 +++ 3 files changed, 4 insertions(+), 7 deletions(-) create mode 100644 template/src/pages/logs/main.json diff --git a/template/package.json b/template/package.json index 76dccc1..8594c58 100644 --- a/template/package.json +++ b/template/package.json @@ -18,7 +18,7 @@ "vuex": "^3.0.1"{{/vuex}} }, "devDependencies": { - "mpvue-loader": "^1.1.2-rc.4", + "mpvue-loader": "^1.1.2", "mpvue-webpack-target": "^1.0.0", "mpvue-template-compiler": "^1.0.11", "portfinder": "^1.0.13", diff --git a/template/src/pages/logs/main.js b/template/src/pages/logs/main.js index 4752ddb..7a6645a 100644 --- a/template/src/pages/logs/main.js +++ b/template/src/pages/logs/main.js @@ -3,9 +3,3 @@ import App from './index'{{#if_eq lintConfig "airbnb"}};{{/if_eq}} const app = new Vue(App){{#if_eq lintConfig "airbnb"}};{{/if_eq}} app.$mount(){{#if_eq lintConfig "airbnb"}};{{/if_eq}} - -export default { - config: { - navigationBarTitleText: '查看启动日志'{{#if_eq lintConfig "airbnb"}},{{/if_eq}} - }{{#if_eq lintConfig "airbnb"}},{{/if_eq}} -}{{#if_eq lintConfig "airbnb"}};{{/if_eq}} diff --git a/template/src/pages/logs/main.json b/template/src/pages/logs/main.json new file mode 100644 index 0000000..12ef72f --- /dev/null +++ b/template/src/pages/logs/main.json @@ -0,0 +1,3 @@ +{ + "navigationBarTitleText": "查看启动日志" +}