Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
Search - "webpack"
There you are, fiddling with next.js webpack settings, because your isomorphic JS-in-CSS-in-JS SSR fallback from react-native-web to react-dom throws a runtime error on your SSR prerendering server during isomorphic asynchronous data prefetching from Kubernetes backend-for-frontend edge-server with GraphQL.
You have all that tech to display a landing page with an email form, just to send spam emails with ten tracking links and five tracking beacons per email.
Your product can be replaced by an Excel document made in two days.
It was developed in two years by a team of ten developers crunching every day under twelve project managers that can be replaced with a parrot trained to say “Any updates?”
Your evaluation is $5M+. You have 10,000 dependency security warnings, 1000 likes on Product Hunt, 500 comments on Hacker News, and a popular Twitter account.
Your future looks bright. You finish your coffee, crack your knuckles and carry on writing unit tests.5
HOW THE FUCK
DO I USE A NPM PACKAGE
THAT DOESN'T SUPPORT IMPORT X FROM PACKAGE
IN A TYPE:MODULE
WHY THE FUCK CAN'T NODE JUST SUPPORT BOTH
WHAT IN THE FUCK
HOW DOES WEBPACK LET YOU USE BOTH?!
I CANNOT FIND A WORK AROUND FOR ERROR
SyntaxError: The requested module 'file-type' does not provide an export named 'default'
WHAT THE FUCK?
DO I NEED TO USE A DIFFERENT PACKAGE?
WHAT THE FUCK11
Why on gods green earth, would anybody look at a file with 20k lines, which clearly was made by something called WEBPACK and decide it's the right place to implement their changes for the next few years?!?4
One thing JS does great is that everything from the server to the gui to the (extremely flexible) build system is 100% platform independent with very few platform specific bugs. And that's a big deal when a basic setup is 1200 packages from 650+ semi-coordinated people.13
Rust's DX is incredible. I previously published a couple packages to NPM and every step of the way i had to fight with NPM, Webpack, Rollup, Typescript and the mass of third party plugins for all of these that wired them together. Here it's literally just
If you feel it’s time to change I have a great job offer for you…
proceeds with offer with maximum wage that is half what you earn and by the way you need to know React, TypeScript, NextJS, Redux, NodeJS, ES6, Webpack, RESTful i GraphQL API
Nice to have is Python and Go
Girl you need to decide if it’s great offer or technology mishmash.
Hell no, glad you didn’t mentioned young and dynamic team cause I clearly see some dynamic technology stack there.
Company helps people find medical treatment clearly forgot about treatment on their stack.
Someone needs to tell them their tech leads are complete morons but since you’re not looking for head of technology it won’t be me lol.
!rant but kinda
Rails 7 got rid of webpack and Node as a requirement, and for this I am super happy. I heavily disliked having to depend on Node for what is in fact a Ruby framework. I understood the need for it, and I always applaud Rails for being at the forefront of the web dev world and all of the trends that it contains. But maintaining both the node modules required, plus the gemfiles etc was just a big hassle for the simple projects I ever worked on.
This is coming from someone that actually likes JS and Node, but I am thankful this was decoupled.6
Lessions I learned so far from my first big node/npm project with tons of users:
1) If you didn't build something for a while, expect 3 hours of resolving version conflicts for every two weeks since the last build.
2) Even if the tests pass, run the containers on your own machine and make sure that the app doesn't randomly crash before deploying
3) Even if the app seemed to work on your own machine, run the tests again in an environment mimicking prod at most 15 minutes before replacing the running containers.
4) Even if all else indicates that the app will work, only ever deploy if you expect to be available within the 4 hours following a deployment.
5) Don't use shrinkwrap for anything other than locking every version down completely. A partial shrinkwrap will produce bugs that are dependent on the exact hour you built the app _and_ the shrinkwrap file, and therefore no one will ever have seen them other than you.
6) Avoid gyp, and generally try not to interface too much with anything that doesn't run on node. If parts of your solution use very different toolchains, your problems will be approximately proportional to the amount of code. And you'd be surprised just how much code you're running. (otherwise it's more logarithmic because the more code the less likely a new assumption is unique)
7) Do not update webpack or its plugins or anything they might call unless you absolutely need to
8) Containers are cool but the alpine ones are pretty much useless if you have even just one gyp module.
9) There's always another cache. To save yourself a lot of pain, include the build time in every file or its name that the browser can download, and compare these to a fresh build while debugging to assert that the bug is still present in the code you're reading
+1) Although it may look like it, SQLite is far from a simple solution because the code and the bindings aren't maintained. In fact, it'll probably be more time consuming than using a proper database.3
Question: We are planning to transition our old ES5 codebase to modern ES6/ES7 and even typescript.
What would be the build tool you would recommend if we want to start supporting ES6/ES7 and even Typescript?
Webpack, Vite some other?
Mainly I want to move to TypeScript but transition would be slow so the build tool would need to support .ts and .js as well, that is traspile both the .ts and .js into one final production build.
What build tool would you recommend for that?8
Developing front-ends used to be about translating a business use case to an interface. Now I spend days and weeks getting tooling to integrate properly: webpack, babel, React, Vue, SSR, Nuxt, NPM packages, build & CI pipelines, storybooks, and resolving incompatibilities. It's become such a grind I haven't had a single satisfying, productive workday since 4 months.2
> IHateForALiving: Mister Supervisor, I need to do X, I know how to do it with Vue but I can't do it in AngularJS, how did you do it in the past?
> Supervisor: It's a mess, you need to do A, B, C, D and E, but webpack interferes so you have to come up with something to bypass the whole thing
> Me: ok whatever thx
> Supervisor: I know it's a problem, a more modern framework would do it in a heartbeat :(
Those are bold words for the guy who saw my first PoC, noticed I was using Vue and made me throw everything in the rubbish, explicitly ordering me to use AngularJS.
What cheap/good quality node.js hosting provider for nodejs/react/mongodb app do you suggest? (including sale, black friday etc.)9
I just had a ptsd (not real ptsd) attack cause I remembered in one of my first jobs we had gulp, grunt AND webpack to build our angularjs project.
Did I fix that mess? Sure!
Will the memory of it stalk me until new year? Absolutely.1
Well I started learning REACT FUCKING JS because of our team requirements. I'm a Vue developer and well it's a little more complicated for me because react is way harder.
Today I started a simple project to practice react. First thing I realized was that in react project we cannot edit Webpack config by just adding a config file in project root.
In vue we could just add few lines of codes in vue.config.js and then we were good to go!
but in REACT FUCKING JS we must install another library named Carco, which is not COMPATIBLE with latest react version!!!!!
FFS WHAT THE FUCK IS THIS FRAMEWORK20
Dev goals for 2022? Best and worst DX in the past?
Wish to prioritize customers with useful business goals who are open to sustainable web dev, usability and accessibility.
Want to use even more CSS and find a way to use new features like parent selectors without sacrificing compatibility.
Continue learning and using Symfony, but also continue with my full-stack side project using JS or even better TypeScript for the backend also for the backend.
Best developer experience: getting new customers for my own business after leaving a company last winter.
Worst developer experiences:
Corporate customers with large budgets and design agencies seem to fancy all the antipatterns I thought bad and obsolete, like carousel content, animations everywhere, and autoplay videos on the home page. Poorly written, poorly thought, and sometimes contradictory, requirements. Customers and agencies changing their mind halfway through a project.
"Agile" daily meetings, not giving devops necessary repository permissions, and making Webpack mandatory for no real reason.2
In most businesses, self-proclaimed full-stack teams are usually more back-end leaning as historically the need to use JS more extensively has imposed itself on back-end-only teams (that used to handle some basic HTML/CSS/JS/bootstrap on the side). This is something I witnessed over the years in 4 projects.
Back-end developers looking for a good JS framework will inevitably land on the triad of Vue, React and Angular, elegant solutions for SPA's. These frameworks are way more permissive than traditional back-end MVC frameworks (Dotnet core, Symfony, Spring boot), meaning it is easy to get something that looks like it's working even when it is not "right" (=idiomatic, unit-testable, maintainable).
They then use components as if they were simple HTML elements injecting the initial state via attributes (props), skip event handling and immediately add state store libraries (Vuex, Redux). They aren't aware that updating a single prop in an object with 1000 keys passed as prop will be nefarious for rendering performance. They also read something about SSR and immediately add Next.js or Nuxt.js, a custom Node express.js proxy and npm install a ton of "ecosystem" modules like webpack loaders that will become abandonware in a year.
After 6 months you get: 3 basic forms with a few fields, regressions, 2MB of JS, missing basic a11y, unmaintainable translation files & business logic scattered across components, an "outdated" stack that logs 20 deprecation notices on npm install, a component library that is hard to unit-test, validate and update, completely vendor-& version locked in and hundreds of thousands of wasted dollars.
I empathize with the back-end devs: JS frameworks should not brand themselves as "simple" or "one-size-fits-all" solutions. They should not treat their audience as if it were fully aware and able to use concepts of composition, immutability, and custom "hooks" paired with the quirks of JS, and especially WHEN they are a good fit.
Why building a library of React component should be this hard: I'm sick of Webpack, Babel, Typescript and all the shit which is duct taped together to build some damn widgets.4
I'm learning how to bundle with webpack. Cool. Exept that I don't have a single project in my portfolio that would benefit from any of it's features. Is this another "enterprise only" thing I can easily ignore in favor for the few <script> tags I'd normally use to hook up VUE or whatever?12
Behold! This is the first time in my career when Jest and unit testing in general actually helped me 😂
Spent two days moving from a fucking slow piece of crap called Gatsby to Vite, trying to comprehend the difference between TS aliases, Babel aliases and Linaria aliases. Found an answer inside a totally unrelated issue explaining Jest stuff, good job on documentation, Linaria!
Vite is fast. Crazy fast. Forget about Webpack, Parcel and things alike — Vite doesn't even need to bundle JS.
Gatsby was slow to the point of my computer's audio glitching, I'm not even talking about the OS interface lags.
Vite is fast to the point that I don't actually need a new MacBook.1
Node server with webpack poly fill on embedded device. Why 😂 .
Replacing node-fetch with node http instead of waiting for native node fetch API. Why 😂
All npm scripts on package.json are dead. Why 😂
Node server is not even sharing TS interfaces with frontend.
Customers are complaining about MeM0r1 L3k and let's build more features on stupid node.
Fucking kill me.1