瀏覽代碼

refactor: defined some Vue global variables to get rid of console warning

Kristian Vos 2 年之前
父節點
當前提交
f706cf5984
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      frontend/webpack.common.js

+ 6 - 1
frontend/webpack.common.js

@@ -5,6 +5,7 @@ const config = require("config");
 const { VueLoaderPlugin } = require("vue-loader");
 const HtmlWebpackPlugin = require("html-webpack-plugin");
 const ESLintPlugin = require("eslint-webpack-plugin");
+const { DefinePlugin } = require("webpack");
 
 const fetchVersionAndGitInfo = cb => {
 	const debug = {
@@ -128,7 +129,11 @@ module.exports = {
 			}
 		}),
 		new ESLintPlugin(),
-		new InsertDebugInfoPlugin()
+		new InsertDebugInfoPlugin(),
+		new DefinePlugin({
+			__VUE_OPTIONS_API__: true,
+			__VUE_PROD_DEVTOOLS__: false
+		})
 	],
 	module: {
 		rules: [