Giter VIP home page Giter VIP logo

Comments (16)

cometkim avatar cometkim commented on June 18, 2024 3

https://github.com/gatsbyjs/gatsby/blob/e50407a235e5e168e875d8a8d701f59084204328/packages/gatsby/src/bootstrap/load-plugins/load.js#L260-L266

GatsbyJS is now supporting typescript plugin, but.. it pushes into the after of the user plugins. As a result, the linaria plugin runs before the typescript loader is attached.

If the user explicitly sets the typescript plugin above it will work, but I need to find a better way.

from gatsby-plugin-linaria.

newash avatar newash commented on June 18, 2024 1

🎉 Thank you, it does!

from gatsby-plugin-linaria.

yurkoturskiy avatar yurkoturskiy commented on June 18, 2024 1

I've just updated everything and got the same error using v1.1.3. With v1.1.2 and v1.1.1, everything works fine. I don't use typescript. I rechecked on a blank project before posting and got the same error.

from gatsby-plugin-linaria.

silvenon avatar silvenon commented on June 18, 2024 1

Well, isn't hacking webpack configs fun… I'll check it out.

from gatsby-plugin-linaria.

silvenon avatar silvenon commented on June 18, 2024 1

@guandjoy ok, both should now work in v1.1.4.

from gatsby-plugin-linaria.

yurkoturskiy avatar yurkoturskiy commented on June 18, 2024 1

@silvenon Thank you!

from gatsby-plugin-linaria.

cometkim avatar cometkim commented on June 18, 2024 1

This would be working after #18 merged.

from gatsby-plugin-linaria.

silvenon avatar silvenon commented on June 18, 2024 1

Published in v1.2.2 🚀

from gatsby-plugin-linaria.

JesseFarebro avatar JesseFarebro commented on June 18, 2024 1

This issue has resurfaced now that Gatsby supports Typescript out of the box. The TS check doesn't evaluate properly anymore as the internal plugin doesn't seem to add the resolvers in the same way.

https://github.com/silvenon/gatsby-plugin-linaria/blob/e3a40aa7d650c5cde95b5cf27ce89f51f1bce7cb/src/gatsby-node.js#L7-L9

from gatsby-plugin-linaria.

cometkim avatar cometkim commented on June 18, 2024 1

Ah, I almost forgot about it. I will follow up on this issue again this weekend.

from gatsby-plugin-linaria.

silvenon avatar silvenon commented on June 18, 2024

Should be working in v1.1.3, please try again.

from gatsby-plugin-linaria.

yurkoturskiy avatar yurkoturskiy commented on June 18, 2024

Same error raises when I run:
gatsby build
That starts to happen after I've updated Gatsby. Same with all versions of your plugin. Develop mode works fine.

from gatsby-plugin-linaria.

silvenon avatar silvenon commented on June 18, 2024

Hm, I wasn't able to reproduce the error. Which versions of Gatsby and gatsby-plugin-linaria are you using?

from gatsby-plugin-linaria.

cometkim avatar cometkim commented on June 18, 2024

@silvenon I think this is the same issue with #17

from gatsby-plugin-linaria.

yurkoturskiy avatar yurkoturskiy commented on June 18, 2024

@silvenon here is the small repo with two branches https://github.com/guandjoy/gatsby-linaria-test
master - latest versions
prev - versions I used when wrote the comment.

But the result is the same. Now it raises the error in both develop and build cases.

from gatsby-plugin-linaria.

JM-Mendez avatar JM-Mendez commented on June 18, 2024

I fixed the TS check and got it to properly configure the loader when typescript was detected, and it still failed.

The only thing that worked was to manually install and add gatsby-plugin-typescript before gatsby-plugin-linaria to my config as per the original instructions 🤷

from gatsby-plugin-linaria.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.