File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change
1
+ import path from 'path' ;
2
+
1
3
import replace from '@rollup/plugin-replace' ;
2
4
3
5
import { makeBaseNPMConfig , makeNPMConfigVariants } from '../../rollup/index' ;
@@ -8,7 +10,6 @@ export default makeNPMConfigVariants(
8
10
makeBaseNPMConfig ( {
9
11
hasBundles : true ,
10
12
packageSpecificConfig : {
11
- external : [ ...Object . keys ( pkg . dependencies || { } ) , ...Object . keys ( pkg . peerDependencies || { } ) ] ,
12
13
plugins : [
13
14
// TODO: Remove this - replay version will be in sync w/ SDK version
14
15
replace ( {
@@ -22,6 +23,12 @@ export default makeNPMConfigVariants(
22
23
// set exports to 'named' or 'auto' so that rollup doesn't warn about
23
24
// the default export in `worker/worker.js`
24
25
exports : 'named' ,
26
+
27
+ // As we are inlining the rrweb dependency here, we need to ensure the nested folders are correct
28
+ // Without this config, you get:
29
+ // * build/npm/esm/node_modules/rrweb/...
30
+ // * build/npm/esm/packages/replay/...
31
+ preserveModulesRoot : path . join ( process . cwd ( ) , 'src' ) ,
25
32
} ,
26
33
} ,
27
34
} ) ,
You can’t perform that action at this time.
0 commit comments