Skip to content
This repository has been archived by the owner on May 20, 2020. It is now read-only.

Commit

Permalink
do not transpile in dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
GaurangTandon committed Jun 26, 2019
1 parent 4524161 commit beb10b4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const moduleObject = {
const MODE = "development";
let moduleObject = {
rules: [
{
test: /\.js$/,
Expand All @@ -13,13 +14,15 @@ const moduleObject = {
],
};

if (MODE === "development") { moduleObject = undefined; }

// webpack will only transform all import/export directives
// gulp will minify all the files
module.exports = {
// development mode ensures terser (es6 minifier) is not run
// see https://webpack.js.org/configuration/mode
module: moduleObject,
mode: "development",
mode: MODE,
entry: {
background: `${__dirname}/js/background.js`,
detector: `${__dirname}/js/detector.js`,
Expand Down

0 comments on commit beb10b4

Please sign in to comment.