diff --git a/electron/blocker/blocker.ts b/electron/blocker/blocker.ts index 456fda1..d7c5fac 100644 --- a/electron/blocker/blocker.ts +++ b/electron/blocker/blocker.ts @@ -81,7 +81,7 @@ export class BlockerIntegration { // Temp fix -- manually override adblocker's preload script // to point to CJS that has been copied over with config in webpack.config.js // require.resolve('@cliqz/adblocker-electron-preload'); - const preloadScript = path.join(electron.app.getAppPath(), './preview/assets/adblocker/preload.cjs'); + const preloadScript = path.join(electron.app.getAppPath(), './preview/assets/adblocker/preload.cjs.js'); // const originPath = require.resolve('@cliqz/adblocker-electron-preload'); // const preloadScript = path.resolve(path.dirname(originPath), 'preload.cjs'); diff --git a/electron/webpack.config.js b/electron/webpack.config.js index f1d8600..4f4c109 100644 --- a/electron/webpack.config.js +++ b/electron/webpack.config.js @@ -126,7 +126,8 @@ const mainConfig = { }, { from: path.resolve(__dirname, '..', 'node_modules', '@cliqz', 'adblocker-electron-preload', 'dist', 'cjs', 'preload.cjs').replace(/\\/g, '/'), - to: path.join('preview', 'assets', 'adblocker'), + to: path.join('preview', 'assets', 'adblocker', 'preload.cjs.js'), + toType: 'file', context: path.resolve(__dirname, '..', 'node_modules', '@cliqz', 'adblocker-electron-preload', 'dist') }, { diff --git a/package.json b/package.json index 041ab57..fc8271d 100644 --- a/package.json +++ b/package.json @@ -63,8 +63,8 @@ }, "optionalDependencies": { "appdmg": "^0.6.0", - "electron-squirrel-startup": "^1.0.0", - "electron-winstaller": "~5.2.1" + "electron-squirrel-startup": "1.0.0", + "electron-winstaller": "5.2.1" }, "resolutions": { "vue": "2.6.12", diff --git a/yarn.lock b/yarn.lock index 79fc530..fe09c46 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2697,10 +2697,10 @@ electron-settings@~4.0.2: mkdirp "^1.0.4" write-file-atomic "^3.0.3" -electron-squirrel-startup@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/electron-squirrel-startup/-/electron-squirrel-startup-1.0.1.tgz#c9171568d724884c7a2b03760bfeedcf921c63ab" - integrity sha512-sTfFIHGku+7PsHLJ7v0dRcZNkALrV+YEozINTW8X1nM//e5O3L+rfYuvSW00lmGHnYmUjARZulD8F2V8ISI9RA== +electron-squirrel-startup@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/electron-squirrel-startup/-/electron-squirrel-startup-1.0.0.tgz#19b4e55933fa0ef8f556784b9c660f772546a0b8" + integrity sha512-Oce8mvgGdFmwr+DsAcXBmFK8jFfN6yaFAP9IvyhTfupM3nFkBku/7VS/mdtJteWumImkC6P+BKGsxScoDDkv9Q== dependencies: debug "^2.2.0" @@ -2709,10 +2709,10 @@ electron-to-chromium@^1.3.47, electron-to-chromium@^1.4.796: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.818.tgz#7762c8bfd15a07c3833b7f5deed990e9e5a4c24f" integrity sha512-eGvIk2V0dGImV9gWLq8fDfTTsCAeMDwZqEPMr+jMInxZdnp9Us8UpovYpRCf9NQ7VOFgrN2doNSgvISbsbNpxA== -electron-winstaller@~5.2.1: - version "5.2.2" - resolved "https://registry.yarnpkg.com/electron-winstaller/-/electron-winstaller-5.2.2.tgz#529a3528a0dcb36268c0c5048d0f05ed0cedfb4f" - integrity sha512-nw+SbS0DA6SF8bEkcL4SqtPOoLKc5JkEXAz7kzdzz22rY12PZRtTn9zpztbwy+xrLqSBBFR1u0bdvNLpvlmrkw== +electron-winstaller@5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/electron-winstaller/-/electron-winstaller-5.2.1.tgz#1a22d8125f35745a9fbbe7c0aa1e91d0556d520e" + integrity sha512-2UuvOGMLLGJioIBsqWANF1A19G7uJuIifae8/pR3FClI21aCJc5nutAOGnZI17kkxUc47UqByqKOl0XSVtwAlQ== dependencies: "@electron/asar" "^3.2.1" debug "^4.1.1"