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

Clear requirements in modules cache between transpilations #45

Closed
thymikee opened this issue Aug 27, 2017 · 4 comments
Closed

Clear requirements in modules cache between transpilations #45

thymikee opened this issue Aug 27, 2017 · 4 comments
Assignees
Labels
priority: critical ☢️ Issue is a critical bug that affects most of the users
Milestone

Comments

@thymikee
Copy link
Member

Updating external variables (e.g. theme colors) has no effect in produced CSS.

// theme.js
export default {
  text: 'black';
}
// App.js
import theme from '../styles/theme';

const navLink = css`
  color: ${theme.text}; 
`;

cc @zamotany

@thymikee
Copy link
Member Author

Worth to note it happens with webpack-dev-server

@zamotany
Copy link
Contributor

I guess it makes sense, since how babel/webpack could know to retranspile file App.js if theme.js has changed. We need to came up with clever way to do it.

@zamotany zamotany changed the title External variables are cached and not reevaluated by babel plugin Re-evaluate and extract if requirements had changed Aug 27, 2017
@zamotany zamotany self-assigned this Aug 27, 2017
@thymikee
Copy link
Member Author

If I change App.js, the situation doesn't change too. If it was, I wouldn't rise an issue

@zamotany
Copy link
Contributor

Ok, I have an idea, I'll spend some time on this tomorrow

@satya164 satya164 modified the milestone: Version 0 Aug 27, 2017
@zamotany zamotany added the priority: critical ☢️ Issue is a critical bug that affects most of the users label Aug 28, 2017
@zamotany zamotany changed the title Re-evaluate and extract if requirements had changed Clear requirements in modules cache between transpilations Aug 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: critical ☢️ Issue is a critical bug that affects most of the users
Projects
None yet
Development

No branches or pull requests

3 participants