Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Still getting CSS issues in >= 3.0.1 #305

Open
subdavis opened this issue Mar 16, 2021 · 0 comments
Open

Still getting CSS issues in >= 3.0.1 #305

subdavis opened this issue Mar 16, 2021 · 0 comments

Comments

@subdavis
Copy link
Contributor

subdavis commented Mar 16, 2021

I think something about Vue's CSS preprocessing is broken when the module entrypoint is discovered through package.json's main property. I think most packages are immune to this because they pre-compile the CSS into a js bundle or directly into the render function, but we're shipping SFCs.

If I import everything directly through index.js via @girder/components/src instead of the naked package name, everything works. But using the package name forces resolution of index.js using the main property. I don't know if that process lands you on a different webpack code path or what.

Seems simplest to just update all the docs here to make @girder/components/src the official import string, but I'm going to do some more testing.

Similar to #295 for the demo app because @/ is an alias directly to the index.js rather than forcing resolution with the package file I think. It's a different problem though, because this is about the CSS defined in each component and not the MDI css tree shaking.

For anyone wanting to use GWC 3.0.1 in a typescript project and get a quick workaround, here's the definitions to forward:

// src/@types/girder-components-src.d.ts
declare module '@girder/components/src' {
  export * from '@girder/components';
  export { default } from '@girder/components';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant