Skip to content

Commit

Permalink
fixup loader order
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Dec 17, 2018
1 parent 9e3f931 commit b0a6294
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ module.exports = async (
},
{
test: /\.(js|mjs|tsx?)$/,
use: [{
use: [...minify ? [{
loader: __dirname + "/loaders/terser-loader.js",
options: { sourceMap }
}] : [], {
loader: __dirname + "/loaders/relocate-loader.js",
options: { assetNames, assets }
}]
Expand All @@ -135,15 +138,8 @@ module.exports = async (
outDir: '//'
}
}
},
{
...minify ? [{
test: /\.(js|mjs)$/,
use: [{
loader: __dirname + "/loaders/terser-loader.js",
options: { sourceMap }
}]
}] : []
}
]
},
plugins: [
Expand Down

0 comments on commit b0a6294

Please sign in to comment.