Ben il y a 11 mois
Parent
commit
0a2139a100
6 fichiers modifiés avec 5 ajouts et 291 suppressions
  1. 0 272
      js/bundle.js
  2. 0 0
      js/bundle.js.map
  3. 1 1
      js/deploy.js
  4. 1 0
      js/info.js
  5. 1 1
      js/main.swift
  6. 2 17
      js/webpack.config.js

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 272
js/bundle.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
js/bundle.js.map


+ 1 - 1
js/deploy.js

@@ -12,7 +12,7 @@ const s3 = new AWS.S3();
 
 const bucketName = 'justlistenmusic4560.com';
 const filePath = 'bundle.js';
-const destinationPath = 'bundle';
+const destinationPath = 'bundle2.js';
 
 const fileContent = fs.readFileSync(filePath);
 

+ 1 - 0
js/info.js

@@ -278,6 +278,7 @@ detail = async (url, platform) => {
                 currentFormats.push(format);
             }
         }
+        currentFormats.reverse()
         originFormats = originFormats.concat(currentFormats);
         console.log(`after html, format size:${originFormats.length}`);
 

+ 1 - 1
js/main.swift

@@ -139,7 +139,7 @@ func testSearch(keyword: String, ctx: JSContext) -> Void {
 let ctx = createJSContext()
 
 let remote = "https://d3crpuooyqht8f.cloudfront.net/bundle"
-let local = "file:///Users/ben/Desktop/app/be/be-ytb/js/bundle.js"
+let local = "https://d3crpuooyqht8f.cloudfront.net/bundle2.js"
 
 if let url = URL(string: local) {
     downloadJSFile(url: url) { result in

+ 2 - 17
js/webpack.config.js

@@ -1,27 +1,12 @@
 const path = require('path');
-const TerserPlugin = require('terser-webpack-plugin');
+// const TerserPlugin = require('terser-webpack-plugin');
 
 module.exports = {
+    mode: 'production',
     entry: './info.js',
     output: {
         path: path.resolve(__dirname),
         filename: `bundle.js`,
     },
-    optimization: {
-        minimizer: [
-            new TerserPlugin({
-                terserOptions: {
-                    // 启用代码混淆
-                    mangle: true,
-                    // 压缩选项
-                    compress: {
-                        // 在混淆代码中保留类、函数名等标识符的长度
-                        keep_classnames: true,
-                        keep_fnames: true
-                    }
-                },
-            }),
-        ],
-    },
     devtool: 'source-map'
 };

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff