Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
tripodsan committed Jun 27, 2024
1 parent 3bb648b commit 7d7d05c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/EdgeBundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class EdgeBundler extends WebpackBundler {
const { cfg } = this;
const opts = {
target: 'webworker',
mode: 'development',
mode: 'production',
// the universal adapter is the entry point
entry: cfg.adapterFile || path.resolve(__dirname, 'template', 'edge-index.js'),
output: {
Expand Down Expand Up @@ -105,6 +105,15 @@ export default class EdgeBundler extends WebpackBundler {
__dirname: true,
__filename: false,
},
optimization: {
// we enable production mode in order to get the correct imports (eg micromark has special
// export condition for 'development'). but we disable minimize and keep named modules
// in order to easier match log errors to the bundle
minimize: false,
concatenateModules: false,
mangleExports: false,
moduleIds: 'named',
},
plugins: [],
};
if (cfg.minify) {
Expand Down

0 comments on commit 7d7d05c

Please sign in to comment.