Skip to content

Commit

Permalink
chore: update rollup config to disable sourcemap in the CI (#52)
Browse files Browse the repository at this point in the history
* chore: update rollup config to disable sourcemap in the CI

* test: update to use 'ts-expect-error' insted of 'ts-ignore'
  • Loading branch information
mato533 authored Oct 29, 2024
1 parent 88bb608 commit 2e3265d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const getPlugins = (plugins: Plugin[]): Plugin[] => {
return plugins
}
}
const sourcemap = () => process.env.CI !== 'true'

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const defineConfig = (pkg: Record<string, any>) => {
Expand All @@ -74,18 +75,18 @@ const defineConfig = (pkg: Record<string, any>) => {
dir: dirname(pkg.main),
exports: 'named',
footer: 'module.exports = Object.assign(exports.default, exports);',
sourcemap: true,
sourcemap: sourcemap(),
},
{
format: 'es',
dir: dirname(pkg.module),
plugins: [emitModulePackageFile()],
sourcemap: true,
sourcemap: sourcemap(),
},
],
plugins: getPlugins([
typescript({
sourceMap: true,
sourceMap: sourcemap(),
}),
json(),
nodeExternals(),
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/channel.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ describe('haveSameStructure', () => {
},
},
}
// @ts-ignore
// @ts-expect-error
expect(haveSameStructure(apiHandlers, channelMap)).toBeFalsy()
})
})

0 comments on commit 2e3265d

Please sign in to comment.