Skip to content

Commit

Permalink
feat: experimental.typescriptBundlerResolution flag (#1384)
Browse files Browse the repository at this point in the history
Co-authored-by: Pooya Parsa <pooya@pi0.io>
  • Loading branch information
danielroe and pi0 authored Jul 14, 2023
1 parent cbc76ad commit fd9a9ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@ declare module 'nitropack' {
strict: nitro.options.typescript.strict,
target: "ESNext",
module: "ESNext",
moduleResolution: "Node",
moduleResolution: nitro.options.experimental.typescriptBundlerResolution
? "Bundler"
: "Node",
allowJs: true,
resolveJsonModule: true,
jsx: "preserve",
Expand Down
4 changes: 4 additions & 0 deletions src/types/nitro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,10 @@ export interface NitroOptions extends PresetOptions {
wasm?: boolean | RollupWasmOptions;
legacyExternals?: boolean;
openAPI?: boolean;
/**
* See https://github.com/microsoft/TypeScript/pull/51669
*/
typescriptBundlerResolution?: boolean;
};
future: {
nativeSWR: boolean;
Expand Down

0 comments on commit fd9a9ee

Please sign in to comment.