File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -44,9 +44,15 @@ async function resolvePeer(module) {
44
44
}
45
45
}
46
46
47
+ const builtLibraries = [ ] ;
47
48
const bundledModules = new Set ( ) ;
48
49
async function bundleModule ( module ) {
49
- if ( bundledModules . has ( module ) ) return ;
50
+ if (
51
+ bundledModules . has ( module ) ||
52
+ builtLibraries . some ( ( library ) => module . startsWith ( library ) )
53
+ ) {
54
+ return ;
55
+ }
50
56
bundledModules . add ( module ) ;
51
57
52
58
const peer = await resolvePeer ( module ) ;
@@ -114,6 +120,7 @@ async function buildComponentLibrary(name) {
114
120
115
121
if ( ! source ) return ;
116
122
123
+ builtLibraries . push ( name ) ;
117
124
const destination = path . resolve ( 'dist' , 'miniprogram_npm' , name ) ;
118
125
await fs . copy ( source , destination ) ;
119
126
Original file line number Diff line number Diff line change @@ -44,9 +44,15 @@ async function resolvePeer(module) {
44
44
}
45
45
}
46
46
47
+ const builtLibraries = [ ] ;
47
48
const bundledModules = new Set ( ) ;
48
49
async function bundleModule ( module ) {
49
- if ( bundledModules . has ( module ) ) return ;
50
+ if (
51
+ bundledModules . has ( module ) ||
52
+ builtLibraries . some ( ( library ) => module . startsWith ( library ) )
53
+ ) {
54
+ return ;
55
+ }
50
56
bundledModules . add ( module ) ;
51
57
52
58
const peer = await resolvePeer ( module ) ;
@@ -114,6 +120,7 @@ async function buildComponentLibrary(name) {
114
120
115
121
if ( ! source ) return ;
116
122
123
+ builtLibraries . push ( name ) ;
117
124
const destination = path . resolve ( 'dist' , 'miniprogram_npm' , name ) ;
118
125
await fs . copy ( source , destination ) ;
119
126
You can’t perform that action at this time.
0 commit comments