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
2
2
yarn-error.log
3
3
4
4
.vscode /settings.json
5
+ .idea
5
6
6
7
* .tgz
7
8
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ interface SentryUnpluginFactoryOptions {
43
43
*
44
44
* Release injection:
45
45
* 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"; `)
47
47
* to all entrypoint files of the user code (see `transformInclude` and `transform` hooks). This import is then resolved
48
48
* by the sentry plugin to a virtual module that sets the global variable (see `resolveId` and `load` hooks).
49
49
* 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 1
1
// @ts -check
2
- import { sentryVitePlugin } from "@sentry/bundler -plugin-core " ;
2
+ import { sentryVitePlugin } from "@sentry/vite -plugin" ;
3
3
import { defineConfig } from "vite" ;
4
4
import * as path from "path" ;
5
5
Original file line number Diff line number Diff line change @@ -14,7 +14,9 @@ import { UnpluginOptions } from "unplugin";
14
14
function viteReleaseInjectionPlugin ( injectionCode : string ) : UnpluginOptions {
15
15
return {
16
16
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
18
20
vite : createRollupReleaseInjectionHooks ( injectionCode ) ,
19
21
} ;
20
22
}
You can’t perform that action at this time.
0 commit comments