generated from chiffre-io/template-library
-
-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Output a debug build with user timings marks
Not really a fix, but this triggers a patch update under SemRel.
- Loading branch information
Showing
8 changed files
with
125 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// This file is needed for projects that have `moduleResolution` set to `node` | ||
// in their tsconfig.json to be able to `import {} from 'next-usequerystate/debug'`. | ||
// Other module resolutions strategies will look for the `exports` in `package.json`, | ||
// but with `node`, TypeScript will look for a .d.ts file with that name at the | ||
// root of the package. | ||
|
||
export * from './dist/debug' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
import { defineConfig } from 'tsup' | ||
|
||
const isDebugBuild = process.env.NODE_ENV !== 'production' | ||
|
||
export default defineConfig({ | ||
entry: ['src/index.ts', 'src/parsers.ts'], | ||
splitting: true, | ||
entry: isDebugBuild ? ['src/index.ts'] : ['src/index.ts', 'src/parsers.ts'], | ||
format: ['esm', 'cjs'], | ||
dts: true, | ||
outDir: isDebugBuild ? 'dist/debug' : 'dist', | ||
splitting: true, | ||
treeshake: true, | ||
sourcemap: isDebugBuild ? 'inline' : false, | ||
define: { | ||
__DEBUG__: process.env.NODE_ENV === 'production' ? 'false' : 'true' | ||
__DEBUG__: isDebugBuild ? 'true' : 'false' | ||
} | ||
}) |