-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(profiling-node): make sure debug build plugin is used (#10534)
Fixes #10525 When writing the rollup config, we didn't include the debug build plugin. This led to things not be replaced properly as `profiling-node` bundles everything into a single file. This was also causing issues in our CI: https://github.com/getsentry/sentry-javascript/actions/runs/7804351046/job/21287026518?pr=10527 Backporting this fix to v7 so we can do a `7.100.1` release after we merge this in.
- Loading branch information
1 parent
821537c
commit 17a5d38
Showing
4 changed files
with
161 additions
and
29 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
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,25 +1,12 @@ | ||
import commonjs from '@rollup/plugin-commonjs'; | ||
import resolve from '@rollup/plugin-node-resolve'; | ||
import typescript from '@rollup/plugin-typescript'; | ||
import { makeBaseNPMConfig, makeNPMConfigVariants, plugins } from '@sentry-internal/rollup-utils'; | ||
|
||
const configs = makeNPMConfigVariants(makeBaseNPMConfig()); | ||
const cjsConfig = configs.find(config => config.output.format === 'cjs'); | ||
|
||
if (!cjsConfig) { | ||
throw new Error('CJS config is required for profiling-node.'); | ||
} | ||
|
||
const config = { | ||
...cjsConfig, | ||
input: 'src/index.ts', | ||
output: { ...cjsConfig.output, file: 'lib/index.js', format: 'cjs', dir: undefined, preserveModules: false }, | ||
plugins: [ | ||
plugins.makeLicensePlugin('Sentry Node Profiling'), | ||
resolve(), | ||
commonjs(), | ||
typescript({ tsconfig: './tsconfig.json' }), | ||
], | ||
}; | ||
|
||
export default config; | ||
import { makeBaseNPMConfig } from '@sentry-internal/rollup-utils'; | ||
|
||
export default makeBaseNPMConfig({ | ||
packageSpecificConfig: { | ||
input: 'src/index.ts', | ||
output: { file: 'lib/index.js', format: 'cjs', dir: undefined, preserveModules: false }, | ||
plugins: [resolve(), commonjs(), typescript({ tsconfig: './tsconfig.json' })], | ||
}, | ||
}); |
Oops, something went wrong.