wasm 加密

This commit is contained in:
Jesse-Ma
2023-03-07 17:55:05 +08:00
parent 8242885c50
commit 25d9048506
5 changed files with 31 additions and 13 deletions

View File

@@ -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: {