File tree Expand file tree Collapse file tree 4 files changed +6
-3
lines changed
Expand file tree Collapse file tree 4 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ node_modules
22yarn-error.log
33
44.vscode /settings.json
5+ .idea
56
67* .tgz
78
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ interface SentryUnpluginFactoryOptions {
4343 *
4444 * Release injection:
4545 * Per default the sentry bundler plugin will inject a global `SENTRY_RELEASE` into each JavaScript/TypeScript module
46- * that is part of the bundle. On a technical level this is done by appending an import (`import "sentry-release-injector;" `)
46+ * that is part of the bundle. On a technical level this is done by appending an import (`import "sentry-release-injector"; `)
4747 * to all entrypoint files of the user code (see `transformInclude` and `transform` hooks). This import is then resolved
4848 * by the sentry plugin to a virtual module that sets the global variable (see `resolveId` and `load` hooks).
4949 * If a user wants to inject the release into a particular set of modules they can use the `releaseInjectionTargets` option.
Original file line number Diff line number Diff line change 11// @ts -check
2- import { sentryVitePlugin } from "@sentry/bundler -plugin-core " ;
2+ import { sentryVitePlugin } from "@sentry/vite -plugin" ;
33import { defineConfig } from "vite" ;
44import * as path from "path" ;
55
Original file line number Diff line number Diff line change @@ -14,7 +14,9 @@ import { UnpluginOptions } from "unplugin";
1414function viteReleaseInjectionPlugin ( injectionCode : string ) : UnpluginOptions {
1515 return {
1616 name : "sentry-vite-release-injection-plugin" ,
17- enforce : "pre" as const , // need this so that vite runs the resolveId hook
17+ // run `post` to avoid tripping up @rollup/plugin-commonjs when cjs is used
18+ // as we inject an `import` statement
19+ enforce : "post" as const , // need this so that vite runs the resolveId hook
1820 vite : createRollupReleaseInjectionHooks ( injectionCode ) ,
1921 } ;
2022}
You can’t perform that action at this time.
0 commit comments