Comments (4)
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.
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.
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.
🎉 This issue has been resolved in version 1.0.6 🎉
The release is available on:
Your semantic-release bot 📦🚀
from react95.
Related Issues (20)
- Missing assets folder for `<GlobalStyle />`
- Clippy is undefined HOT 3
- Altering the CSS of a component HOT 4
- New resource from fullscreen to the component Video
- Problems at using the React95 with next.js HOT 2
- Is it okay to use commercial, really? HOT 5
- help with installing theme(macos big sur) HOT 3
- CDN's for clippy are down HOT 7
- Failed to compile due to file React95 dependency HOT 3
- input and textfield have rounded corners on iOS HOT 2
- React version issue with latest version of Gatsby HOT 2
- TaskBar window buttons rendering double HOT 4
- theme.colors is undefined in TitleBarBackground in TitleBar.js HOT 3
- @react95/core + Nextjs: Module parse failed error HOT 1
- Why this component library? HOT 3
- can not use in latest nextjs (13.4.19) HOT 3
- Scrolling issue in storybook HOT 3
- Video player throws onChange handler error in React 18 Vite HOT 3
- Issues in Next.js 14 HOT 3
- Theme doesn't seem to apply to taskbar HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react95.