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

Fix css.d.ts double-build issues #251

Closed
jakearchibald opened this issue Nov 8, 2018 · 4 comments
Closed

Fix css.d.ts double-build issues #251

jakearchibald opened this issue Nov 8, 2018 · 4 comments
Labels
project infra build process, deploy, staging, etc

Comments

@jakearchibald
Copy link
Collaborator

It'll half our deploy time 😄.

The answer is to use https://github.com/Quramy/typed-css-modules rather than (or in addition to) the webpack plugin.

@fstanis
Copy link

fstanis commented Nov 15, 2018

I tried playing around with this, but it seems https://github.com/Quramy/typed-css-modules doesn't quite work since it doesn't support Sass and tackling that is going down the rabbit hole.

I'm not quite clear why typings-for-css-modules-loader is causing this. My understanding is that it's generating the typings asynchronously and TS isn't waiting for it? Also, possibly unrelated, but there's an issue claiming it's incompatible with webpack 4 and css-loader 1.0 which we use.

@egorkaru
Copy link

it doesn't support Sass and tackling that is going down the rabbit hole.

just replace
loader: 'typed-css-modules-loader',
with
loader: ['typed-css-modules-loader', 'sass-loader'],

@fstanis
Copy link

fstanis commented Nov 26, 2018

That's already working that way. The idea here (I think) was to try to replace typed-css-modules-loader in webpack with typed-css-modules which is an (unrelated?) CLI that does a similar thing and have it be a separate step in the build. However, because this CLI doesn't support Sass, we'd also need to use the Sass CLI to get that to work, making it too convoluted as a solution IMO.

@kosamari kosamari added the project infra build process, deploy, staging, etc label Nov 27, 2018
@kosamari kosamari modified the milestone: V2 Nov 27, 2018
@jakearchibald
Copy link
Collaborator Author

I managed to get it working #350. Bypassed the webpack plugin entirely, but that's mostly because I don't understand webpack plugins.

jakearchibald added a commit that referenced this issue Nov 29, 2018
* Create CSS typings before build

* Let's try this.

* Adding comment

* Remove hack from travis
alisaitbilgi pushed a commit to alisaitbilgi/squoosh that referenced this issue Feb 19, 2019
…hromeLabs#350)

* Create CSS typings before build

* Let's try this.

* Adding comment

* Remove hack from travis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project infra build process, deploy, staging, etc
Projects
None yet
Development

No branches or pull requests

4 participants