nxext / nx-extensions

Nx Extensions for Stencil, Svelte, SolidJS, Preact, Ionic, and Capacitor
MIT License
458 stars 101 forks source link

fix(stencil): resolve `validateConfig` error from @stencil/core@14.17.0 onward. #1088

Closed ShariefO closed 4 months ago

ShariefO commented 4 months ago

Hey!

From @stencil/core@14.17.0 onward, the following error occurs for executors 'build', 'test', 'e2e', and 'serve': Cannot read properties of undefined (reading 'validateConfig').

This issue stems from globalThis.stencil not being properly set within the loadCoreCompiler function.

To resolve this, the loadCoreCompiler function has been updated to ensure proper initialization of globalThis.stencil by assigning the imported compiler module if globalThis.stencil is undefined.

Additionally, I have added a test case in stencil-process.spec.ts to validate the correct initialization of globalThis.stencil by loadCoreCompiler.

I have tested the fix by upgrading the '@stencil/core' package from version 4.12.6 to 4.17.0 within this repo and running the tests in stencil-process.spec.ts with and without the fix applied.

This issue has also been mentioned in #1086

nx-cloud[bot] commented 4 months ago

☁️ Nx Cloud Report

We didn't find any information for the current pull request with the commit c24849d7a4627ba217c587cad1347dd116236667. Please verify you are running the latest version of the NxCloud runner.

Check the Nx Cloud Source Control Integration documentation for more information.

Alternatively, you can contact us at cloud-support@nrwl.io.


Sent with 💌 from NxCloud.