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

[2.0] Animations broken with modules #872

Closed
gpoitch opened this issue Dec 14, 2018 · 5 comments · Fixed by #876
Closed

[2.0] Animations broken with modules #872

gpoitch opened this issue Dec 14, 2018 · 5 comments · Fixed by #876

Comments

@gpoitch
Copy link

gpoitch commented Dec 14, 2018

  • Operating System: macOS 10.14
  • Node Version: 10.4.1
  • NPM Version: 6.4.1
  • webpack Version: 4.27.1
  • css-loader Version: 2.0.1

Expected Behavior

CSS animation sytax works as expected

Actual Behavior

animation syntax becomes broken when transformed with css modules

Code

Give this input:

animation: slide-right 300ms forwards ease-out, fade-in 300ms forwards ease-out;

Produces this invalid output ('local' near the end) since version 2.0:

animation: slide-right__Fzt 300ms forwards ease-out, fade-in__1Ir 300ms :local(forwards) :local(ease-out);

css loader:

{
    loader: 'css-loader',
    options: {
      modules: true
    }
}
@pasiba
Copy link

pasiba commented Dec 15, 2018

Issue related to postcss-modules, solution now is to use css-loader@1.0.1

@gpoitch
Copy link
Author

gpoitch commented Dec 15, 2018

Looks like it may be from this dependency:
https://github.com/css-modules/postcss-modules-local-by-default

There are a bunch of related tests, so maybe some specific combination with my example
https://github.com/css-modules/postcss-modules-local-by-default/blob/master/test.js#L175-L181

@alexander-akait
Copy link
Member

Yep, problem in dependence (in postcss-modules-local-by-default), feel free to send a PR in this repo with fix and we upgrade deps, thanks. I can take care about this in next week, a lot of other issues

@kogai
Copy link

kogai commented Dec 20, 2018

Same issue occurred at my environemnt too, And I'll attempt to fix it 👉
css-modules/postcss-modules-local-by-default#5

@alexander-akait
Copy link
Member

Fixed in https://github.com/webpack-contrib/css-loader/releases/tag/v2.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants