Giter Club home page Giter Club logo

Comments (4)

allyssonsantos avatar allyssonsantos commented on May 10, 2024 3

Hi @Zachari

Me and @ggdaltoso have searched a lot about this when we were thinking about bundling this library.

After all the content that we found about this, we decided that we do not need Webpack, Rollup, Parcel or any bundler tool. We reached the idea that Webpack is more for application than for libraries.

And about using any kind of css loader, how we are not using css files, we do not need it.

We just need to transpile our code, the code minification will be maded by the application that will use React95.

Here's some content that we read about this: https://medium.com/@lawliet29/tree-shaking-in-real-world-what-could-go-wrong-b398c2b2ebbb

But we might be wrong, so we accept PR's and other suggestions!

Thank you for your point of view.

from react95.

Zachari avatar Zachari commented on May 10, 2024 1

That's understandable. I suggested Webpack because it's the one I have the most experience with when it comes to static assets. Admittedly, Webpack doesn't seem to be the best fit for a library. However, I do disagree that bundlers in general are a good fit towards applications only. Rollup, in particular, appears to be perfect for libraries, especially in situations such as this. However, I can't tinker with it until tomorrow so I can't say whether or not it'd be optimal here. I will tomorrow, however.

I don't fault the logic behind the choice, though. If that's the approach, simply including them in a shared folder to avoid resolution issues seems to be the way to go.

from react95.

Zachari avatar Zachari commented on May 10, 2024

Wouldn't this issue be more suited to a solution using Webpack and loaders (style-loader, css-loader, url-loader, file-loader, etc)? There are ways to accomplish this via Babel plugins, but they're more workarounds to avoid Webpack. Babel is a transpiler first and foremost, not a bundler. All these plugins are doing is transforming the imports at build time.

Using Webpack alongside Babel, you could do all the same things you're doing currently with Babel and simply add the transpilation to the the bundling process, avoid these resolution issues, and get the benefit of additional tools at your disposal during build (minifying code, SASS or whatever else for styling, autoprefixing, etc).

I could be missing some key point that makes this a less than optimal solution, but I feel like Webpack is the move here.

from react95.

ggdaltoso avatar ggdaltoso commented on May 10, 2024

🎉 This issue has been resolved in version 1.0.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

from react95.

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.