Code Monkey home page Code Monkey logo

Comments (6)

nolanlawson avatar nolanlawson commented on May 27, 2024 1

Sure, I would recommend reading CONTRIBUTING.md.

from lwc.

nolanlawson avatar nolanlawson commented on May 27, 2024

Alternatively, we could have @lwc/rollup-plugin just not route .jsx/.tsx files to @lwc/compiler, since @lwc/compiler doesn't need to compile them anyway. (They cannot possibly be LWC components.)

from lwc.

SourabhMulay avatar SourabhMulay commented on May 27, 2024

hey @nolanlawson ,
I have tried fixing it by just checking the file extensions and returning early if file extensions are either .jsx/.tsx. I am not sure whether it'll introduce a breaking changes or not. Can you please verify?

from lwc.

nolanlawson avatar nolanlawson commented on May 27, 2024

Hi @SaurabhMulay999 thanks for the contribution! However, this fix needs to be made inside of @lwc/compiler, not @lwc/rollup-plugin. The Rollup plugin uses the @lwc/compiler under the hood, but there are other consumers of the compiler (e.g. Webpack, LWR).

As mentioned above, I think the simplest fix would be to add the extensions here. It is not ideal, since .jsx/.tsx files are unlikely to need LWC component transformations, and it will assume that someone has set up a tool earlier in the processing pipeline to convert these files into JS, but it seems like the most expedient solution to me.

from lwc.

SourabhMulay avatar SourabhMulay commented on May 27, 2024

Thanks @nolanlawson for the details. I'll try what you have suggested. Is there any open doc maintained to get idea of whole project? It would be helpful.

from lwc.

nolanlawson avatar nolanlawson commented on May 27, 2024

Fixed by #4164

from lwc.

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.