You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which scope/s are relevant/related to the feature request?
vite-plugin-angular
Information
Angular Material uses custom sass and style properties in the package.json exports. When using the imports from Angular Material themes with Vite, it throws an error as it cannot resolve them. This can be fixed by adding sass and style to the resolve.conditions in the Vite config.
We can support this out of the box by adding it to the plugin, where the config will get merged into the provided config.
import{defineConfig}from'vite';importangularfrom'@analogjs/vite-plugin-angular';// https://vitejs.dev/config/exportdefaultdefineConfig(({ mode })=>{return{plugins: [angular({inlineStylesExtension: 'scss',}),],resolve: {conditions: ['sass','style'],// <-- add to vite pluginmainFields: ['module'],},};});
brandonroberts
changed the title
Add support for Angular Material custom exports
Add support for Angular Material custom package.json exports
Oct 17, 2022
brandonroberts
changed the title
Add support for Angular Material custom package.json exports
[FEAT]: Add support for Angular Material custom package.json exports
Oct 17, 2022
Which scope/s are relevant/related to the feature request?
vite-plugin-angular
Information
Angular Material uses custom
sass
andstyle
properties in thepackage.json
exports. When using the imports from Angular Material themes with Vite, it throws an error as it cannot resolve them. This can be fixed by addingsass
andstyle
to theresolve.conditions
in the Vite config.We can support this out of the box by adding it to the plugin, where the config will get merged into the provided config.
Reference yharaskrik/analog-nx-15@c76f4d7#diff-28948f0a986cd471c15c0d8c8d3a3ae39a1b7f8b054af7deb4032b01823dd42e
Describe any alternatives/workarounds you're currently using
No response
I would be willing to submit a PR to fix this issue
The text was updated successfully, but these errors were encountered: