wasm 加密
This commit is contained in:
@@ -6,7 +6,10 @@ module.exports = defineConfig({
|
||||
|
||||
assetsDir: 'static',
|
||||
productionSourceMap: false,
|
||||
|
||||
configureWebpack: (config) => {
|
||||
config.experiments = { asyncWebAssembly: true,syncWebAssembly:true }
|
||||
|
||||
|
||||
config.externals = {
|
||||
'vue': 'Vue',
|
||||
@@ -20,8 +23,7 @@ module.exports = defineConfig({
|
||||
"iview": 'ViewUI',
|
||||
"file-saver": 'saveAs',
|
||||
"clipboard": "ClipboardJS",
|
||||
"vue-i18n": "VueI18n",
|
||||
|
||||
"vue-i18n": "VueI18n"
|
||||
};
|
||||
|
||||
// 为生产环境修改配置
|
||||
@@ -44,7 +46,7 @@ module.exports = defineConfig({
|
||||
|
||||
new CompressionPlugin({
|
||||
algorithm: "gzip", // 使用gzip压缩
|
||||
test: /\.js$|\.html$|\.png$|\.jpg$|\.svg$|\.css$/, // 匹配文件名
|
||||
test: /\.js$|\.html$|\.png$|\.jpg$|\.svg$|\.wasm$|\.css$/, // 匹配文件名
|
||||
filename: "[path][base].gz[query]", // 压缩后的文件名(保持原文件名,后缀加.gz)
|
||||
minRatio: 1, // 压缩率小于1才会压缩
|
||||
threshold: 5120, // 对超过10k的数据压缩
|
||||
@@ -63,7 +65,8 @@ module.exports = defineConfig({
|
||||
devServer: {
|
||||
proxy: {
|
||||
"/note": {
|
||||
target: "http://127.0.0.1:10000/", // 后台接口域名
|
||||
// target: "https://flagnote.com/", // 后台接口域名
|
||||
target: "http://localhost:10000/", // 后台接口域名
|
||||
secure: false, // 如果是https接口,需要配置这个参数
|
||||
changeOrigin: true, //是否跨域
|
||||
pathRewrite: {
|
||||
|
||||
Reference in New Issue
Block a user