Comments (11)
from webpacker.
from webpacker.
What about the webpacker:install:react
(or other framework) Rake task install the webpacker-$framework
gem and running a setup task (from the gem) ?
This would allow people to create adapters for other frameworks and move the framework-specific code out of Webpacker. The adapters for the main frameworks could be in the Rails org on GH to provide legitimacy.
This will also ease integration of any future JS framework into Webpacker, anybody can just create a new gem using the same API (well, rake task & naming).
This is only a proposal, I will align with @dhh views here :)
from webpacker.
@dhh Yes, I too see the simplicity of this and as you pointed out it's not a lot of code and I too think it's not as of now, but I am more concerned on the point that community will try to expand this simple setup for them too. Like, "I am Preact
and I would like to have a simple installer for me too" and so on.
We can suggest to create their own, but then they might turn around and say, "hey you got react and we are as popular and top notch". That's why I thought perhaps removing this whole thing would be ideal meaning it's same level playing field for all. Or, other solution would be is if we cleanup the tasks file and have a separate task for each framework that gets added into the Gem and suggest everyone with a PR to follow that convention.
Although, it sounds like that later one will add some extra work for the folks who are maintaining the Gem because things change so fast in JS realm. That is all my concern :)
from webpacker.
@renchap @gauravtiwari Appreciate your guys' thoughts on this. I think this is probably one of those times where the natural proclivities of Ruby vs JavaScript ecosystems shine through. In JS, it seems like no module is too small to be turned into its own dependency. In Ruby, we're a bit more hesitant to create a lot of tiny dependencies. There's overhead in keeping things in sync, releasing, and other housework that has to be outweighed by the advantages of extraction. In this case, I don't see strong advantages.
There's been a flurry of activity on this repo lately and it hasn't been around adding 101 different HELLOs for obscure frameworks. So I think the perceived onslaught probably isn't so likely to happen. But even if it does, I'm happy to help sort out what makes sense to include and what doesn't. In my opinion, we just need to deal with the majors, which we kinda already have.
So for now, let's leave things as they are. We can always revisit if we get flooded with submissions. But even then, we'd probably just go with a webpacker-* style for those additional submissions. Not for things like React.
from webpacker.
@dhh Yes, I kinda of realised this too so, perhaps something to revisit when the situation actually arises in the future. Sounds good 👍
Thank you :)
from webpacker.
Yes, strongly in favor of this. I plan on using Elm, so anything react/angular/etc would be useless to me, and just bloat.
I would prefer that this gem be focused on only the parts that are generally useful for any framework, present or future, that can be compiled/transpiled to JS via webpack.
from webpacker.
So to proceeded, we'd want someone from rails core to create webpacker-react
, webpacker-angular
and webpacker-vue
repos? Our just let people host them outside of Rails for now?
from webpacker.
@dhh Absolutely, I see your point, however this isn't the same setup as Rails. Rails, as a web-application framework requires a database by default to work with. It's critical there, however it's not the same relationship here. The analogy would be correct if we go to same length to integrate react or angular in the same way it's with PG or MySQL in Rails.
What we are doing currently is running yarn add react react-dom
and then generating an example component file. This setup is available all over the internet and anyone who just follows a readme can add it without a problem. That's why I just pointed to perhaps not have it in the first place because it's adds out of context bloat in this gem, which isn't the problem we are truly solving. We can add all these parts in the readme though, which I think is best place for this to go.
In regards to an example app, we can create a Vanilla es6 app, that demos most of the fancy stuff used in modern javascript. This will take away a lot of problem from us that we might have to handle if we have this - out of context questions and PR's (add my new fancy framework).
from webpacker.
@renchap That is all I am suggesting :)
from webpacker.
Just to understand what is the problem with having a small, curated set of integrations in this gem?
from webpacker.
Related Issues (20)
- Webpacker 6 Disable Babel HOT 1
- Webpacker compilation takes more than 1.5 hours HOT 11
- How do I allow a package in node_modules to be processed by babel? HOT 1
- Remove addition of node_modules to Rails.application.config.assets.paths HOT 1
- V6 Status HOT 3
- Raise an error when javascript_pack_tag or stylesheet_pack_tag are called more than once HOT 1
- Regular Expression Denial of Service in postcss HOT 2
- Intermittent Webpacker.dev_server.running? behavior HOT 2
- Host for assets from a webpacker configuration using custom domains not being resolved HOT 2
- Cherry-pick "Nothing to do" logging update onto `5.x` HOT 1
- Rails 6 WebPacker is not calling JQuery inside views HOT 1
- Security Vulnerability in [email protected] HOT 2
- currently no loaders are configured to process this file HOT 1
- Incompatibility with Ruby 3.2.0 HOT 2
- Confusing gem description on RubyGems HOT 1
- Npm package for 5.4.4 was not released HOT 2
- class variable @@local_levels of ActiveSupport::Logger is overtaken by Logger HOT 2
- Trying to deploy but assets assets:precompile fail
- Security Vulnerability for postcss
- Postcss Security Vulnerability
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 webpacker.