Commit 4d291e8e authored by jsz315's avatar jsz315

h5

parent d3e7af8b
......@@ -110,6 +110,8 @@ exports.computeEntry = function(entry) {
result[pathBuild + name] = [entryJsPath];
}
// result["vendor"] = ['vue', 'vue-router', 'axios'];
console.log(result);
return result;
};
......
......@@ -8,7 +8,7 @@ const merge = require("webpack-merge");
const webpack = require("webpack");
const path = require("path");
const FriendlyErrorsPlugin = require("friendly-errors-webpack-plugin");
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const baseWebpackConfig = require("./webpack.base.conf");
const utils = require("./utils");
const config = require("../config");
......@@ -41,7 +41,38 @@ const devWebpackConfig = merge(baseWebpackConfig, {
})
},
devtool: config.build.devtool,
optimization: {
// minimize: false,
minimizer: [
new UglifyJsPlugin({
uglifyOptions: config.build.uglifyConfig
})
],
// 分割代码块
splitChunks: {
chunks: 'async',
minSize: 30000,
minChunks: 1,
maxAsyncRequests: 5,
maxInitialRequests: 3,
name: true,
cacheGroups: {
// common: {
// name: "common",
// chunks: "all",
// // minSize: 1,
// priority: 0
// },
// vendor: {
// name: "vendor",
// test: /[\\/]node_modules[\\/]/,
// chunks: "all",
// priority: 10
// }
}
}
// runtimeChunk: true
},
plugins: [
new webpack.DefinePlugin({
HTTP: http.dev.HTTP,
......@@ -58,7 +89,7 @@ const devWebpackConfig = merge(baseWebpackConfig, {
// should the console be cleared between each compilation?
// default is true
clearConsole: true
})
}),
// new webpack.ProvidePlugin({
// _: "underscore"
// })
......
......@@ -3,7 +3,7 @@
* @author : Dec-F
* @Date : 2018-08-17 14:16:56
* @Last Modified by: 江思志
* @Last Modified time: 2019-03-13 10:49:01
* @Last Modified time: 2019-03-19 17:03:01
*/
import Vue from 'vue';
......
......@@ -201,17 +201,24 @@ export default {
});
}
},
goActivitySetting(item) {
let id = item.id;
let obj = JSON.parse(item.text);
async goActivitySetting(item) {
let obj = JSON.parse(item.text);
let params = {
contentId: item.id
};
let res = await get(API.getScId, params);
if (res.success) {
let id = res.data;
let url = formatUrl('/pages/activity/link/main', {
scid: id,
img: obj.previewImageUrl,
url: obj.activity_url
});
wx.miniProgram.navigateTo({
url: url
});
url: url
});
}
},
goArticlList() {
let url = '/pages/content/articleList/main';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment