@@ -17,7 +17,7 @@ import { externalAlias, getBaseEsbuildOptions, getEsbuildAliases, getEsbuildExte
17
17
* @param opts build options
18
18
* @returns an array of ESBuild option objects
19
19
*/
20
- export async function getInternalClientBundle ( opts : BuildOptions ) : Promise < ESBuildOptions [ ] > {
20
+ export async function getInternalClientBundles ( opts : BuildOptions ) : Promise < ESBuildOptions [ ] > {
21
21
const inputClientDir = join ( opts . srcDir , 'client' ) ;
22
22
const outputInternalClientDir = join ( opts . output . internalDir , 'client' ) ;
23
23
const outputInternalClientPolyfillsDir = join ( outputInternalClientDir , 'polyfills' ) ;
@@ -41,6 +41,10 @@ export async function getInternalClientBundle(opts: BuildOptions): Promise<ESBui
41
41
42
42
const clientExternal = getEsbuildExternalModules ( opts , opts . output . internalDir ) ;
43
43
44
+ // the runtime imports from `@stencil/core/mock-doc/constants` so we don't
45
+ // want to have the existing alias around
46
+ delete internalClientAliases [ '@stencil/core/mock-doc' ] ;
47
+
44
48
const internalClientBundle : ESBuildOptions = {
45
49
...getBaseEsbuildOptions ( ) ,
46
50
entryPoints : [ join ( inputClientDir , 'index.ts' ) ] ,
@@ -59,9 +63,6 @@ export async function getInternalClientBundle(opts: BuildOptions): Promise<ESBui
59
63
replace ( createReplaceData ( opts ) ) ,
60
64
externalAlias ( '@app-data' , '@stencil/core/internal/app-data' ) ,
61
65
externalAlias ( '@utils/shadow-css' , './shadow-css.js' ) ,
62
- // we want to get the esm, not the cjs, since we're creating an esm
63
- // bundle here
64
- externalAlias ( '@stencil/core/mock-doc' , '../../mock-doc/index.js' ) ,
65
66
findAndReplaceLoadModule ( ) ,
66
67
] ,
67
68
} ;
0 commit comments