-
Notifications
You must be signed in to change notification settings - Fork 8
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
Not working in Gatsby production mode #17
Comments
@silvenon I guess the issue is in the if (type === 'style' && LINARIA_STYLESHEET_RULE.test(props['data-href'])) {
// code here is not executed
} The regex doesn't seem to match meaning it's not getting the required linaria.css file in the |
Does the latest v1.2.1 fix the issue? |
@silvenon Nope, version |
The gatsby-ssr impl only adjusts the priority for the There may be another (something like loader changed inside of gatsby?) cause. |
Options for enable/disable critical css would be nice BTW. |
The
And the |
gatsbyjs/gatsby@268ed27 found this. |
Working on this. it would be resolved with a few cleanups. |
done. 😎 |
@cometkim tried by cloning your branch and running the build but it fails with this error |
@ryands17 I think it just have been fixed in last commit. Could you try it again? |
It works flawlessly. Thanks a lot :) |
Published in v1.2.2 🚀 |
Environment
node:
8.12.0
gatsby:
2.12.0
gatsby-plugin-linaria:
1.2.0
linaria:
1.3.1
react:
16.8.6
Description
I have created a new starter project with Gatsby via the following command:
npx gatsby new my-default-starter https://github.com/gatsbyjs/gatsby-starter-default
Then added the required packages via:
yarn add gatsby-plugin-linaria linaria
After that, I added the
gatsby-plugin-linaria
plugin at the end of plugins in thegatsby-config.js
file.Lastly I edited the
components/header.js
file to reflect the following:After following these steps, I ran the project in development via
npm start
and it works flawlessly.But running in production via
npm run build && npm run serve
, the build is successful but the styles do not get applied. The class is applied but the styles are not reflected anywhere.I also tried deleting the
public
,.cache
andlinaria-cache
folders but it didn't make any difference.The text was updated successfully, but these errors were encountered: