File tree 1 file changed +16
-5
lines changed
1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change 1
1
import createRollupConfig from '@guanghechen/rollup-config'
2
2
import path from 'path'
3
3
4
- async function rollupConfig ( ) {
4
+ const internalModules = new Set ( [ '@algorithm.ts/constant' ] )
5
+
6
+ export default async function rollupConfig ( ) {
5
7
const { default : manifest } = await import ( path . resolve ( 'package.json' ) )
6
- const config = createRollupConfig ( {
8
+ const configs = createRollupConfig ( {
7
9
manifest,
8
10
pluginOptions : {
9
11
typescriptOptions : { tsconfig : 'tsconfig.src.json' } ,
10
12
} ,
11
13
} )
12
- return config
13
- }
14
14
15
- export default rollupConfig ( )
15
+ configs . forEach ( config => {
16
+ if ( config . external ) {
17
+ const external = config . external
18
+ // eslint-disable-next-line no-param-reassign
19
+ config . external = function ( id ) {
20
+ if ( internalModules . has ( id ) ) return false
21
+ return external ( id )
22
+ }
23
+ }
24
+ } )
25
+ return configs
26
+ }
You can’t perform that action at this time.
0 commit comments