Selaa lähdekoodia

chore: fix sourcemap

Gerald 3 vuotta sitten
vanhempi
sitoutus
e6cd1d0fed
5 muutettua tiedostoa jossa 381 lisäystä ja 354 poistoa
  1. 1 2
      package.json
  2. 2 2
      scripts/fake-dep-loader.js
  3. 0 1
      scripts/manifest-helper.js
  4. 2 2
      scripts/plaid.conf.js
  5. 376 347
      yarn.lock

+ 1 - 2
package.json

@@ -28,7 +28,7 @@
     "@babel/plugin-syntax-function-bind": "^7.18.6",
     "@gera2ld/plaid": "~2.5.6",
     "@gera2ld/plaid-common-ts": "~2.5.1",
-    "@gera2ld/plaid-test": "^2.5.7",
+    "@gera2ld/plaid-test": "~2.5.7",
     "@gera2ld/plaid-webpack": "~2.5.7",
     "@gera2ld/plaid-webpack-vue3": "~2.5.7",
     "@types/chrome": "^0.0.191",
@@ -37,7 +37,6 @@
     "cross-env": "^7.0.3",
     "cross-spawn": "^7.0.3",
     "del": "^6.1.1",
-    "eslint-plugin-jest": "^26.7.0",
     "fancy-log": "^2.0.0",
     "gulp": "^4.0.2",
     "gulp-plumber": "^1.1.0",

+ 2 - 2
scripts/fake-dep-loader.js

@@ -1,6 +1,6 @@
 const Path = require('path');
 
-module.exports = function FakeDepLoader(source) {
+module.exports = function FakeDepLoader(source, sourcemap) {
   this.query.files.forEach(f => this.addDependency(Path.resolve(f)));
-  return source;
+  this.callback(null, source, sourcemap);
 };

+ 0 - 1
scripts/manifest-helper.js

@@ -59,7 +59,6 @@ class ListBackgroundScriptsPlugin {
           JSON.stringify(manifest, null, this.minify ? 0 : 2),
           { encoding: 'utf8' });
       }
-      await fs.unlink(`${dist}/${bgId}.html`).catch(() => {});
     });
   }
 }

+ 2 - 2
scripts/plaid.conf.js

@@ -14,11 +14,11 @@ exports.pages = [
 ].reduce((res, name) => Object.assign(res, {
   [`${name}/index`]: {
     entry: `./src/${name}`,
-    html: options => ({
+    html: name !== 'background' && (options => ({
       ...options,
       title: 'Violentmonkey',
       injectTo: item => ((item.attributes.src || '').endsWith('/index.js') ? 'body' : 'head'),
-    }),
+    })),
   },
 }), {});
 

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 376 - 347
yarn.lock


Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä