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 6, 2018
1 parent d709133 commit 29e3efb
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,15 @@ module.exports = async (
test: /\.node$/,
use: [{
loader: __dirname + "/loaders/node-loader.js",
}]
},
{
test: /\.(js|mjs)$/,
use: [...minify ? [{
loader: __dirname + "/loaders/terser-loader.js",
options: { sourceMap }
}] : [], {
loader: __dirname + "/loaders/relocate-loader.js",
options: { assetNames, assets }
}]
},
Expand All @@ -109,15 +118,7 @@ module.exports = async (
{
test: /\.tsx?$/,
use: [{ loader: __dirname + "/loaders/ts-loader.js" }]
},
{
...minify ? [{
test: /\.(js|mjs)$/,
use: [{
loader: __dirname + "/loaders/terser-loader.js",
options: { sourceMap }
}]
}] : []
}
]
},
plugins: [
Expand Down

0 comments on commit 29e3efb

Please sign in to comment.