File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
packages/bundler-plugin-core/src Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,12 @@ const unplugin = createUnplugin<Options>((options, unpluginMetaContext) => {
133133 } ) ;
134134 }
135135
136+ if ( process . cwd ( ) . match ( / \\ n o d e _ m o d u l e s \\ | \/ n o d e _ m o d u l e s \/ / ) ) {
137+ logger . warn (
138+ "Running Sentry plugin from within a `node_modules` folder. Some features may not work."
139+ ) ;
140+ }
141+
136142 const releaseName = await releaseNamePromise ;
137143
138144 // At this point, we either have determined a release or we have to bail
@@ -185,6 +191,10 @@ const unplugin = createUnplugin<Options>((options, unpluginMetaContext) => {
185191 transformInclude ( id ) {
186192 logger . debug ( 'Called "transformInclude":' , { id } ) ;
187193
194+ if ( id . match ( / \\ n o d e _ m o d u l e s \\ | \/ n o d e _ m o d u l e s \/ / ) ) {
195+ return false ; // never transform 3rd party modules
196+ }
197+
188198 // We normalize the id because vite always passes `id` as a unix style path which causes problems when a user passes
189199 // a windows style path to `releaseInjectionTargets`
190200 const normalizedId = path . normalize ( id ) ;
You can’t perform that action at this time.
0 commit comments