From 73ead2060f0492a111a877cdb3c91c54e5f4a4f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Jim=C3=A9nez?= Date: Tue, 30 Aug 2022 21:05:12 +0200 Subject: [PATCH] refactor: simplify development settings (#583) * chore: update minor deps * chore: simplify plugin development settings * chore: remove unused regex * chore: add babel/register to server script --- app/background/index.html | 2 +- app/lib/loadThemes.js | 2 +- app/main/index.html | 5 +- app/package.json | 2 +- app/yarn.lock | 48 +- package.json | 36 +- webpack.config.base.js | 8 +- webpack.config.electron.js | 17 +- webpack.config.production.js | 4 +- yarn.lock | 1488 ++++++++++++++++++++-------------- 10 files changed, 940 insertions(+), 672 deletions(-) diff --git a/app/background/index.html b/app/background/index.html index 888ceb9b..2e72d4ce 100644 --- a/app/background/index.html +++ b/app/background/index.html @@ -5,7 +5,7 @@ (function() { const script = document.createElement('script'); script.async = true; - script.src = (process.env.HOT) + script.src = (process.env.NODE_ENV) ? 'http://localhost:3000/dist/background.bundle.js' : '../dist/background.bundle.js'; document.write(script.outerHTML); diff --git a/app/lib/loadThemes.js b/app/lib/loadThemes.js index 7bd13e5e..7e24d88d 100644 --- a/app/lib/loadThemes.js +++ b/app/lib/loadThemes.js @@ -5,7 +5,7 @@ * Label is text that is shown in preferences theme selector */ export default () => { - const prefix = process.env.HOT ? 'http://localhost:3000/' : '../' + const prefix = process.env.NODE_ENV === 'development' ? 'http://localhost:3000/' : '../' return [ { value: `${prefix}dist/main/css/themes/light.css`, diff --git a/app/main/index.html b/app/main/index.html index a8b35220..40a02a66 100644 --- a/app/main/index.html +++ b/app/main/index.html @@ -6,7 +6,8 @@