Commit 44d9e056 by 阳浪

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	build/webpack.base.config copy.js
#	build/webpack.base.config.js
#	src/locales/newWord.json
#	src/locales/zh-CN.json
parents e53e4a7f a87b85a5
{
"presets": [
[
"@babel/preset-env",
{
"targets":{
"browsers":["last 2 versions"]
},
// "debug":true
}
],
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-syntax-dynamic-import",
["@babel/plugin-proposal-decorators", { "legacy": true }],
["@babel/plugin-proposal-class-properties", { "loose": true }],
["import", { "libraryName": "antd", "libraryDirectory": "es" }],
"react-hot-loader/babel",
"@babel/plugin-transform-runtime"
]
}
{
"parser": "babel-eslint",
"plugins": [
"react",
"jsx-a11y"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
}
},
"rules": {
"semi": 2
}
}
...@@ -53,7 +53,7 @@ module.exports = { ...@@ -53,7 +53,7 @@ module.exports = {
} }
}, },
plugins: [ plugins: [
new HtmlWebpackPlugin(generateHtml("index", "未木云智慧党建")), new HtmlWebpackPlugin(generateHtml("index", "机电e先锋智慧党建平台")),
new webpack.DefinePlugin({ new webpack.DefinePlugin({
"process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV), "process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV),
routerMode: JSON.stringify("hash") routerMode: JSON.stringify("hash")
......
...@@ -50,7 +50,7 @@ module.exports = { ...@@ -50,7 +50,7 @@ module.exports = {
} }
}, },
plugins: [ plugins: [
new HtmlWebpackPlugin(generateHtml("index", "未木云智慧党建")), new HtmlWebpackPlugin(generateHtml("index", "机电e先锋智慧党建平台")),
new webpack.DefinePlugin({ new webpack.DefinePlugin({
"process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV), "process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV),
routerMode: JSON.stringify("hash") routerMode: JSON.stringify("hash")
......
...@@ -8,7 +8,7 @@ const TerserPlugin = require("terser-webpack-plugin"); ...@@ -8,7 +8,7 @@ const TerserPlugin = require("terser-webpack-plugin");
const common = require("./webpack.base.config.js"); const common = require("./webpack.base.config.js");
const ProgressBarPlugin = require("progress-bar-webpack-plugin"); const ProgressBarPlugin = require("progress-bar-webpack-plugin");
module.exports = merge(common, { module.exports = merge(common, {
mode: "production", mode: "production",
module: { module: {
rules: [{ rules: [{
enforce: "pre", enforce: "pre",
...@@ -56,30 +56,30 @@ module.exports = merge(common, { ...@@ -56,30 +56,30 @@ module.exports = merge(common, {
] ]
}, },
performance: { performance: {
hints: "warning", hints: "warning",
maxAssetSize: 30000000, maxAssetSize: 30000000,
maxEntrypointSize: 50000000, maxEntrypointSize: 50000000,
assetFilter: function(assetFilename) { assetFilter: function(assetFilename) {
return assetFilename.endsWith(".css") || assetFilename.endsWith(".js"); return assetFilename.endsWith(".css") || assetFilename.endsWith(".js");
}, },
}, },
optimization: { optimization: {
minimize: true, minimize: true,
minimizer: [ minimizer: [
new TerserPlugin({ new TerserPlugin({
sourceMap: true, // Must be set to true if using source-maps in production sourceMap: true, // Must be set to true if using source-maps in production
terserOptions: { terserOptions: {
output: { output: {
}, },
parallel: true, parallel: true,
cache: true, cache: true,
drop_console: true, drop_console: true,
drop_debugger: false, drop_debugger: false,
pure_funcs: ['console.log','Warning','warnings','debugger'], // 移除console pure_funcs: ['console.log','Warning','warnings','debugger'], // 移除console
} }
}) })
] ]
} }
}); });
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"server": "node build/server.prod.js", "server": "node build/server.prod.js",
"dev": "cross-env NODE_ENV=development webpack-dev-server --config ./build/webpack.dev.config.js --port 8092", "dev": "cross-env NODE_ENV=development webpack-dev-server --config ./build/webpack.dev.config.js --port 8092",
"buildP": "npm run build:prod", "buildP": "npm run build:prod",
"build:prod": "cross-env NODE_ENV=production webpack --config ./build/webpack.prod.config.js", "build:prod": "cross-env NODE_ENV=production webpack --config ./build/webpack.prod.config.js",
"//build": " npm run clean:distJS && npm run clean:distImgs && cross-env NODE_ENV=production && webpack --config ./build/webpack.dev.config.js", "//build": " npm run clean:distJS && npm run clean:distImgs && cross-env NODE_ENV=production && webpack --config ./build/webpack.dev.config.js",
"build": " npm run clean:distJS && npm run clean:distImgs && NODE_ENV=production && webpack --config ./build/webpack.prod.config.js", "build": " npm run clean:distJS && npm run clean:distImgs && NODE_ENV=production && webpack --config ./build/webpack.prod.config.js",
"clean:distJS": "rm -rf ./dist/js", "clean:distJS": "rm -rf ./dist/js",
...@@ -26,20 +26,24 @@ ...@@ -26,20 +26,24 @@
"@babel/plugin-syntax-dynamic-import": "^7.0.0", "@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.2.0", "@babel/plugin-transform-runtime": "^7.2.0",
"@babel/preset-env": "^7.1.6", "@babel/preset-env": "^7.1.6",
"@babel/preset-react": "^7.0.0", "@babel/preset-react": "^7.25.7",
"autoprefixer": "^9.3.1", "autoprefixer": "^9.3.1",
"axios": "^0.18.1", "axios": "^0.18.1",
"babel-eslint": "^10.0.1", "babel-cli": "^6.26.0",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.0.4", "babel-loader": "^8.0.4",
"babel-plugin-import": "^1.11.0", "babel-plugin-import": "^1.11.0",
"babel-plugin-transform-decorators-legacy": "^1.3.5", "babel-plugin-transform-decorators-legacy": "^1.3.5",
"braft-editor": "^2.3.8", "braft-editor": "^2.3.8",
"braft-finder": "0.0.21", "braft-finder": "0.0.21",
"braft-utils": "^3.0.12", "braft-utils": "^3.0.13",
"cross-env": "^5.2.0", "cross-env": "^5.2.0",
"css-loader": "^1.0.1", "css-loader": "^1.0.1",
"cssnano": "^4.1.7", "cssnano": "^4.1.7",
"eslint-plugin-react": "^7.11.1", "enzyme": "^3.4.0",
"enzyme-adapter-react-16": "^1.15.8",
"enzyme-to-json": "^3.6.2",
"eslint-plugin-react": "^7.37.1",
"extract-text-webpack-plugin": "^4.0.0-beta.0", "extract-text-webpack-plugin": "^4.0.0-beta.0",
"file-loader": "^2.0.0", "file-loader": "^2.0.0",
"html-loader": "^0.5.5", "html-loader": "^0.5.5",
...@@ -53,12 +57,14 @@ ...@@ -53,12 +57,14 @@
"mini-css-extract-plugin": "^0.4.5", "mini-css-extract-plugin": "^0.4.5",
"moment": "^2.22.1", "moment": "^2.22.1",
"postcss-loader": "^3.0.0", "postcss-loader": "^3.0.0",
"preact-render-to-json": "^3.6.6",
"progress-bar-webpack-plugin": "^1.11.0", "progress-bar-webpack-plugin": "^1.11.0",
"react-cropper": "^1.3.0", "react-cropper": "^1.3.0",
"react-hot-loader": "^4.3.12", "react-hot-loader": "^4.3.12",
"react-iscroll": "^2.0.3", "react-iscroll": "^2.0.3",
"react-loadable": "^5.5.0", "react-loadable": "^5.5.0",
"react-perfect-scrollbar": "^1.5.8", "react-perfect-scrollbar": "^1.5.8",
"react-router": "^4.3.1",
"react-textscroll": "^1.0.0", "react-textscroll": "^1.0.0",
"redux-actions": "^0.12.0", "redux-actions": "^0.12.0",
"redux-logger": "^3.0.6", "redux-logger": "^3.0.6",
...@@ -77,10 +83,14 @@ ...@@ -77,10 +83,14 @@
"whatwg-fetch": "^3.0.0" "whatwg-fetch": "^3.0.0"
}, },
"dependencies": { "dependencies": {
"@vue/babel-helper-vue-jsx-merge-props": "^1.4.0",
"@vue/babel-preset-jsx": "^1.4.0",
"antd": "^3.26.20", "antd": "^3.26.20",
"babel-plugin-transform-vue-jsx": "^3.7.0",
"crypto-js": "^3.1.9-1", "crypto-js": "^3.1.9-1",
"draft-js": "^0.10.5", "draft-js": "^0.11.7",
"draft-js-export-html": "^1.2.0", "draft-js-export-html": "^1.2.0",
"draftjs-utils": "^0.9.4",
"echarts": "^4.2.0-rc.2", "echarts": "^4.2.0-rc.2",
"echarts-for-react": "^2.0.15-beta.0", "echarts-for-react": "^2.0.15-beta.0",
"immutability-helper": "^2.8.1", "immutability-helper": "^2.8.1",
......
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
"npm_config_long": "", "npm_config_long": "",
"npm_config_maxsockets": "50", "npm_config_maxsockets": "50",
"npm_config_message": "%s", "npm_config_message": "%s",
"npm_config_metrics_registry": "https://registry.npmjs.org/", "npm_config_metrics_registry": "http://registry.npm.taobao.org/",
"npm_config_node_gyp": "D:\\Program Files (x86)\\Node\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js", "npm_config_node_gyp": "D:\\Program Files (x86)\\Node\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js",
"npm_config_node_options": "", "npm_config_node_options": "",
"npm_config_node_version": "11.10.0", "npm_config_node_version": "11.10.0",
...@@ -282,7 +282,7 @@ ...@@ -282,7 +282,7 @@
"npm_config_proxy": "", "npm_config_proxy": "",
"npm_config_read_only": "", "npm_config_read_only": "",
"npm_config_rebuild_bundle": "true", "npm_config_rebuild_bundle": "true",
"npm_config_registry": "https://registry.npmjs.org/", "npm_config_registry": "http://registry.npm.taobao.org/",
"npm_config_rollback": "true", "npm_config_rollback": "true",
"npm_config_save": "true", "npm_config_save": "true",
"npm_config_save_bundle": "", "npm_config_save_bundle": "",
......
...@@ -268,7 +268,7 @@ ...@@ -268,7 +268,7 @@
"npm_config_long": "", "npm_config_long": "",
"npm_config_maxsockets": "50", "npm_config_maxsockets": "50",
"npm_config_message": "%s", "npm_config_message": "%s",
"npm_config_metrics_registry": "https://registry.npmjs.org/", "npm_config_metrics_registry": "http://registry.npm.taobao.org/",
"npm_config_node_gyp": "D:\\Program Files (x86)\\Node\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js", "npm_config_node_gyp": "D:\\Program Files (x86)\\Node\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js",
"npm_config_node_options": "", "npm_config_node_options": "",
"npm_config_node_version": "11.10.0", "npm_config_node_version": "11.10.0",
...@@ -290,7 +290,7 @@ ...@@ -290,7 +290,7 @@
"npm_config_proxy": "", "npm_config_proxy": "",
"npm_config_read_only": "", "npm_config_read_only": "",
"npm_config_rebuild_bundle": "true", "npm_config_rebuild_bundle": "true",
"npm_config_registry": "https://registry.npmjs.org/", "npm_config_registry": "http://registry.npm.taobao.org/",
"npm_config_rollback": "true", "npm_config_rollback": "true",
"npm_config_save": "true", "npm_config_save": "true",
"npm_config_save_bundle": "", "npm_config_save_bundle": "",
......
...@@ -268,7 +268,7 @@ ...@@ -268,7 +268,7 @@
"npm_config_long": "", "npm_config_long": "",
"npm_config_maxsockets": "50", "npm_config_maxsockets": "50",
"npm_config_message": "%s", "npm_config_message": "%s",
"npm_config_metrics_registry": "https://registry.npmjs.org/", "npm_config_metrics_registry": "http://registry.npm.taobao.org/",
"npm_config_node_gyp": "D:\\Program Files (x86)\\Node\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js", "npm_config_node_gyp": "D:\\Program Files (x86)\\Node\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js",
"npm_config_node_options": "", "npm_config_node_options": "",
"npm_config_node_version": "11.10.0", "npm_config_node_version": "11.10.0",
...@@ -290,7 +290,7 @@ ...@@ -290,7 +290,7 @@
"npm_config_proxy": "", "npm_config_proxy": "",
"npm_config_read_only": "", "npm_config_read_only": "",
"npm_config_rebuild_bundle": "true", "npm_config_rebuild_bundle": "true",
"npm_config_registry": "https://registry.npmjs.org/", "npm_config_registry": "http://registry.npm.taobao.org/",
"npm_config_rollback": "true", "npm_config_rollback": "true",
"npm_config_save": "true", "npm_config_save": "true",
"npm_config_save_bundle": "", "npm_config_save_bundle": "",
......
...@@ -25,4 +25,4 @@ if(siteName){ ...@@ -25,4 +25,4 @@ if(siteName){
} }
ReactDOM.render(<App />, document.getElementById("root")); ReactDOM.render(<App /> , document.getElementById("root"));
...@@ -555,7 +555,7 @@ ...@@ -555,7 +555,7 @@
"nextMont": "上月", "nextMont": "上月",
"Course": "课程", "Course": "课程",
"Collected": "已收藏", "Collected": "已收藏",
"WeimuyunElearning": "未木云智慧党建", "WeimuyunElearning": "机电e先锋智慧党建平台",
"RelativeContent": "相关内容", "RelativeContent": "相关内容",
"homeworkAttachmentLimitTip": "附件至少", "homeworkAttachmentLimitTip": "附件至少",
"batchDownload": "批量下载", "batchDownload": "批量下载",
......
...@@ -355,7 +355,7 @@ ...@@ -355,7 +355,7 @@
"livestream": "直播", "livestream": "直播",
"questions": "题", "questions": "题",
"MsgFileUploading": "您有文件正在上传,确定继续提交吗?", "MsgFileUploading": "您有文件正在上传,确定继续提交吗?",
"WeimuyunElearning": "未木云智慧党建", "WeimuyunElearning": "机电e先锋智慧党建平台",
"Option": "选项", "Option": "选项",
"Yes": "确定", "Yes": "确定",
"Resend": "重新发送", "Resend": "重新发送",
......
var baseUrl = "https://uat.wechat.kmelearning.com"; var baseUrl = "http://10.23.1.180:8090";
if (location.host.indexOf("localhost") != -1) { if (location.host.indexOf("localhost") != -1) {
// //
// baseUrl = "http://dev.pc.kmelearning.com"; // baseUrl = "http://dev.pc.kmelearning.com";
baseUrl = "https://test.pc.kmelearning.com"; baseUrl = "http://10.23.1.180:8090";
// baseUrl = "https://uat.pc.kmelearning.com"; // baseUrl = "https://uat.pc.kmelearning.com";
// baseUrl = "https://pc.kmelearning.com"; // baseUrl = "https://pc.kmelearning.com";
...@@ -11,7 +11,7 @@ if (location.host.indexOf("localhost") != -1) { ...@@ -11,7 +11,7 @@ if (location.host.indexOf("localhost") != -1) {
}else { }else {
//这里不许改,谁改谁请30杯奶茶,并且罚款500 //这里不许改,谁改谁请30杯奶茶,并且罚款500
baseUrl = ""; baseUrl = "http://10.23.1.180:8090";
} }
// if(urlConfigObj.urlPrefix){ // if(urlConfigObj.urlPrefix){
// baseUrl += "/"+ urlConfigObj.urlPrefix; // baseUrl += "/"+ urlConfigObj.urlPrefix;
......
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