@@ -124,35 +124,6 @@ const config = {
124124 ]
125125} ;
126126
127- // Create compatibility plugin function
128- const createLumaGlCompatPlugin = useKeplerNodeModules => ( {
129- name : 'luma-gl-compat' ,
130- setup ( build ) {
131- // Intercept imports from @nebula .gl/layers that import from @luma.gl/core
132- build . onResolve ( { filter : / ^ @ l u m a \. g l \/ c o r e $ / } , args => {
133- // Only redirect if the import is coming from @nebula .gl/layers
134- if ( args . importer && args . importer . includes ( '@nebula.gl/layers' ) ) {
135- // Always use our compatibility shim when importing from @nebula .gl/layers
136- // The shim re-exports everything from @luma.gl/core plus Geometry from @luma.gl/engine
137- if ( useKeplerNodeModules ) {
138- return {
139- path : resolve ( __dirname , SRC_DIR , 'compat/luma-gl-compat.ts' ) ,
140- namespace : 'file'
141- } ;
142- } else {
143- // When not using kepler node modules, we need to resolve to the shim in the root
144- // LIB_DIR is relative to examples/demo-app, so resolve from config file directory
145- return {
146- path : resolve ( __dirname , LIB_DIR , 'src/compat/luma-gl-compat.ts' ) ,
147- namespace : 'file'
148- } ;
149- }
150- }
151- // Return undefined to let esbuild handle the import normally for other cases
152- return undefined ;
153- } ) ;
154- }
155- } ) ;
156127
157128function addAliases ( externals , args ) {
158129 const resolveAlias = getThirdPartyLibraryAliases ( true ) ;
@@ -312,7 +283,6 @@ function openURL(url) {
312283 // Optionally generate a bundle analysis
313284 plugins : [
314285 ...config . plugins ,
315- createLumaGlCompatPlugin ( true ) ,
316286 {
317287 name : 'bundle-analyzer' ,
318288 setup ( build ) {
@@ -344,7 +314,7 @@ function openURL(url) {
344314 sourcemap : true ,
345315 // add alias to resolve libraries so there is only one copy of them
346316 ...( useKeplerModules ? { alias : localAliases } : { alias : getThirdPartyLibraryAliases ( false ) } ) ,
347- plugins : [ ...config . plugins , createLumaGlCompatPlugin ( useKeplerModules ) ] ,
317+ plugins : [ ...config . plugins ] ,
348318 banner : {
349319 js : `new EventSource('/esbuild').addEventListener('change', () => location.reload());`
350320 }
0 commit comments