Merge background.js and sw.js into bg.js
Now that we have included webpack-preprocessor-loader into Webpack, we
can merge the two files and hide code behind conditional statements
which will be preprocessed at compile time.
Change-Id: I99c87ca33fcb231d04c51ff9651e0cf10443e60b
diff --git a/webpack.config.js b/webpack.config.js
index 660d631..24d3876 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -52,10 +52,7 @@
};
// Background script (or service worker for MV3)
- if (env.browser_target == 'chromium_mv3')
- entry.sw = './src/sw.js';
- else
- entry.background = './src/background.js';
+ entry.bg = './src/bg.js';
let outputPath = path.join(__dirname, 'dist', env.browser_target);