From 4e975dc171227dea77c6003380c19a544e8b88a4 Mon Sep 17 00:00:00 2001 From: lujiehui Date: Thu, 7 Nov 2019 18:53:14 +0800 Subject: [PATCH 1/3] =?UTF-8?q?'=E5=88=A0=E9=99=A4sentry'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/main.js b/src/main.js index 4ae2f7b..5e8a249 100644 --- a/src/main.js +++ b/src/main.js @@ -10,8 +10,6 @@ import '@/icons' // icon import '@/style/common.scss' import { Lazyload } from 'vant' import defaultSettings from '@/settings' -import * as Sentry from '@sentry/browser' -import * as Integrations from '@sentry/integrations' /** * If you don't want to use mock-server @@ -23,10 +21,6 @@ import * as Integrations from '@sentry/integrations' */ import { mockXHR } from '../mock' -Sentry.init({ - dsn: 'https://8754d430a56949cda312695f5586b2df@sentry.io/1800421', - integrations: [new Integrations.Vue({ Vue, attachProps: true })] -}) if (process.env.NODE_ENV === 'production') { mockXHR() } From 8b5a8aaf7ba62614e9ea66c50d2b2fe89079271c Mon Sep 17 00:00:00 2001 From: ljh666 <13216698987@163.com> Date: Tue, 31 Mar 2020 21:45:07 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=8E=BB=E9=99=A4fastclick?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 - src/main.js | 3 --- 2 files changed, 4 deletions(-) diff --git a/package.json b/package.json index 4b57258..9944933 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,6 @@ "axios": "^0.19.0", "core-js": "2.6.5", "dayjs": "^1.8.16", - "fastclick": "^1.0.6", "js-cookie": "^2.2.1", "lib-flexible": "^0.3.2", "vant": "^2.2.5", diff --git a/src/main.js b/src/main.js index 5e8a249..f79561b 100644 --- a/src/main.js +++ b/src/main.js @@ -3,7 +3,6 @@ import 'lib-flexible' import App from './App.vue' import router from '@/router' import store from '@/store' -import FastClick from 'fastclick' import 'utils/permission' import SvgIcon from 'components/SvgIcon' import '@/icons' // icon @@ -25,8 +24,6 @@ if (process.env.NODE_ENV === 'production') { mockXHR() } -FastClick.attach(document.body) - // options 为可选参数,无则不传 Vue.use(Lazyload) From 73a56ae8885b1acb4830f40aec05122d8a7b02d5 Mon Sep 17 00:00:00 2001 From: ljhhhhhh <13216698987@163.com> Date: Fri, 10 Apr 2020 13:54:02 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=80=A7=E8=83=BD?= =?UTF-8?q?=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 7 +++++++ default.conf | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ vue.config.js | 4 ++-- 3 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 Dockerfile create mode 100644 default.conf diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5b1cc05 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +# FROM hub.c.163.com/library/nginx +# EXPOSE 9000 +# RUN rm /etc/nginx/conf.d/default.conf +# ADD default.conf /etc/nginx/conf.d/ +# COPY dist/ /usr/share/nginx/html/ +FROM nginx +EXPOSE 80 \ No newline at end of file diff --git a/default.conf b/default.conf new file mode 100644 index 0000000..8221bce --- /dev/null +++ b/default.conf @@ -0,0 +1,56 @@ +user nginx; +worker_processes 1; + +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; + + +events { + worker_connections 1024; +} + + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + sendfile on; + #tcp_nopush on; + + keepalive_timeout 65; + + gzip on; + gzip_types text/plain application/javascript text/css; + + # 虚拟主机server块 + server { + # 端口 + listen 80; + # 匹配请求中的host值 + server_name localhost; + + # 监听请求路径 + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + + } + + include /etc/nginx/conf.d/*.conf; +} diff --git a/vue.config.js b/vue.config.js index 298eaff..db34a8a 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,7 +1,7 @@ const path = require('path') const CompressionWebpackPlugin = require('compression-webpack-plugin') const UglifyjsWebpackPlugin = require('uglifyjs-webpack-plugin') -const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer') +// 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' // page title @@ -143,7 +143,7 @@ module.exports = { } ) if (IS_PRODUCTION) { - config.plugin('analyzer').use(BundleAnalyzerPlugin) + // config.plugin('analyzer').use(BundleAnalyzerPlugin) config.plugin('html').tap(args => { args[0].cdn = cdn return args