@@ -4,7 +4,7 @@ import type { Package } from '@sentry/types';
4
4
import HtmlWebpackPlugin , { createHtmlTagObject } from 'html-webpack-plugin' ;
5
5
import type { Compiler } from 'webpack' ;
6
6
7
- import { addStaticAsset , addStaticAssetSymlink } from './staticAssets' ;
7
+ import { addStaticAsset , symlinkAsset } from './staticAssets' ;
8
8
9
9
const LOADER_TEMPLATE = fs . readFileSync ( path . join ( __dirname , '../fixtures/loader.js' ) , 'utf-8' ) ;
10
10
const PACKAGES_DIR = path . join ( __dirname , '..' , '..' , '..' , 'packages' ) ;
@@ -214,7 +214,10 @@ class SentryScenarioGenerationPlugin {
214
214
src : 'cdn.bundle.js' ,
215
215
} ) ;
216
216
217
- addStaticAssetSymlink ( this . localOutPath , path . resolve ( PACKAGES_DIR , bundleName , bundlePath ) , 'cdn.bundle.js' ) ;
217
+ symlinkAsset (
218
+ path . resolve ( PACKAGES_DIR , bundleName , bundlePath ) ,
219
+ path . join ( this . localOutPath , 'cdn.bundle.js' ) ,
220
+ ) ;
218
221
219
222
if ( useLoader ) {
220
223
const loaderConfig = LOADER_CONFIGS [ bundleKey ] ;
@@ -245,14 +248,13 @@ class SentryScenarioGenerationPlugin {
245
248
const fileName = `${ integration } .bundle.js` ;
246
249
247
250
// We add the files, but not a script tag - they are lazy-loaded
248
- addStaticAssetSymlink (
249
- this . localOutPath ,
251
+ symlinkAsset (
250
252
path . resolve (
251
253
PACKAGES_DIR ,
252
254
'feedback' ,
253
255
BUNDLE_PATHS [ 'feedback' ] ?. [ integrationBundleKey ] ?. replace ( '[INTEGRATION_NAME]' , integration ) || '' ,
254
256
) ,
255
- fileName ,
257
+ path . join ( this . localOutPath , fileName ) ,
256
258
) ;
257
259
} ) ;
258
260
}
@@ -262,26 +264,23 @@ class SentryScenarioGenerationPlugin {
262
264
if ( baseIntegrationFileName ) {
263
265
this . requiredIntegrations . forEach ( integration => {
264
266
const fileName = `${ integration } .bundle.js` ;
265
- addStaticAssetSymlink (
266
- this . localOutPath ,
267
+ symlinkAsset (
267
268
path . resolve (
268
269
PACKAGES_DIR ,
269
270
'browser' ,
270
271
baseIntegrationFileName . replace ( '[INTEGRATION_NAME]' , integration ) ,
271
272
) ,
272
- fileName ,
273
+ path . join ( this . localOutPath , fileName ) ,
273
274
) ;
274
275
275
276
if ( integration === 'feedback' ) {
276
- addStaticAssetSymlink (
277
- this . localOutPath ,
277
+ symlinkAsset (
278
278
path . resolve ( PACKAGES_DIR , 'feedback' , 'build/bundles/feedback-modal.js' ) ,
279
- 'feedback-modal.bundle.js' ,
279
+ path . join ( this . localOutPath , 'feedback-modal.bundle.js' ) ,
280
280
) ;
281
- addStaticAssetSymlink (
282
- this . localOutPath ,
281
+ symlinkAsset (
283
282
path . resolve ( PACKAGES_DIR , 'feedback' , 'build/bundles/feedback-screenshot.js' ) ,
284
- 'feedback-screenshot.bundle.js' ,
283
+ path . join ( this . localOutPath , 'feedback-screenshot.bundle.js' ) ,
285
284
) ;
286
285
}
287
286
@@ -295,10 +294,9 @@ class SentryScenarioGenerationPlugin {
295
294
296
295
const baseWasmFileName = BUNDLE_PATHS [ 'wasm' ] ?. [ integrationBundleKey ] ;
297
296
if ( this . requiresWASMIntegration && baseWasmFileName ) {
298
- addStaticAssetSymlink (
299
- this . localOutPath ,
297
+ symlinkAsset (
300
298
path . resolve ( PACKAGES_DIR , 'wasm' , baseWasmFileName ) ,
301
- 'wasm.bundle.js' ,
299
+ path . join ( this . localOutPath , 'wasm.bundle.js' ) ,
302
300
) ;
303
301
304
302
const wasmObject = createHtmlTagObject ( 'script' , {
0 commit comments