@@ -7,7 +7,6 @@ import { PluginContext, rollup, RollupOptions, TreeshakingOptions } from 'rollup
77
88import type * as d from '../../declarations' ;
99import { lazyComponentPlugin } from '../output-targets/dist-lazy/lazy-component-plugin' ;
10- import { createCustomResolverAsync } from '../sys/resolve/resolve-module-async' ;
1110import { appDataPlugin } from './app-data-plugin' ;
1211import type { BundleOptions } from './bundle-interface' ;
1312import { coreResolvePlugin } from './core-resolve-plugin' ;
@@ -58,25 +57,24 @@ export const getRollupOptions = (
5857 buildCtx : d . BuildCtx ,
5958 bundleOpts : BundleOptions ,
6059) : RollupOptions => {
61- const customResolveOptions = createCustomResolverAsync ( config . sys , compilerCtx . fs , [
62- '.tsx' ,
63- '.ts' ,
64- '.js' ,
65- '.mjs' ,
66- '.json' ,
67- '.d.ts' ,
68- ] ) ;
6960 const nodeResolvePlugin = rollupNodeResolvePlugin ( {
7061 mainFields : [ 'collection:main' , 'jsnext:main' , 'es2017' , 'es2015' , 'module' , 'main' ] ,
71- customResolveOptions,
7262 browser : true ,
7363 rootDir : config . rootDir ,
7464 ...( config . nodeResolve as any ) ,
65+ extensions : [ '.tsx' , '.ts' , '.js' , '.mjs' , '.json' , '.d.ts' ] ,
7566 } ) ;
7667
77- const orgNodeResolveId = nodeResolvePlugin . resolveId ;
78- const orgNodeResolveId2 = ( nodeResolvePlugin . resolveId = async function ( importee : string , importer : string ) {
68+ // @ts -expect-error - this is required now.
69+ nodeResolvePlugin . resolve = async function ( ) {
70+ // Investigate if we can use this to leverage Stencil's in-memory fs
71+ } ;
72+ // @ts -expect-error - handler is defined
73+ const orgNodeResolveId = nodeResolvePlugin . resolveId . handler ;
74+ // @ts -expect-error - handler is defined
75+ const orgNodeResolveId2 = ( nodeResolvePlugin . resolveId . handler = async function ( importee : string , importer : string ) {
7976 const [ realImportee , query ] = importee . split ( '?' ) ;
77+ // @ts -ignore
8078 const resolved = await orgNodeResolveId . call (
8179 nodeResolvePlugin as unknown as PluginContext ,
8280 realImportee ,
0 commit comments