Skip to content

Commit

Permalink
fix: respect sourceMap option (#141)
Browse files Browse the repository at this point in the history
* fix: default esbuild sourceMap option

* refactor: set `sourceMap` default to true
  • Loading branch information
danielroe authored Apr 22, 2022
1 parent 05c4104 commit e5ab741
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const NitroDefaults: NitroConfig = {
analyze: false,
moduleSideEffects: ['unenv/runtime/polyfill/'],
replace: {},
sourceMap: true,

// Advanced
typescript: {
Expand Down
2 changes: 1 addition & 1 deletion src/rollup/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export const getRollupConfig = (nitro: Nitro) => {
// esbuild
rollupConfig.plugins.push(esbuild({
target: 'es2019',
sourceMap: true,
sourceMap: nitro.options.sourceMap,
...nitro.options.esbuild?.options
}))

Expand Down
2 changes: 1 addition & 1 deletion src/rollup/plugins/esbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export function esbuild (options: Options = {}): Plugin {
loader,
target,
define: options.define,
sourcemap: options.sourceMap !== false,
sourcemap: options.sourceMap,
sourcefile: id
})

Expand Down

0 comments on commit e5ab741

Please sign in to comment.