Click here to Skip to main content
15,887,240 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Facebook AI Bubble Pin
Daniel Pfeffer5-Jun-20 0:46
professionalDaniel Pfeffer5-Jun-20 0:46 
GeneralRe: Facebook AI Bubble Pin
Sander Rossel5-Jun-20 1:13
professionalSander Rossel5-Jun-20 1:13 
GeneralRe: Facebook AI Bubble Pin
W Balboos, GHB5-Jun-20 1:59
W Balboos, GHB5-Jun-20 1:59 
GeneralRe: Facebook AI Bubble Pin
Sander Rossel5-Jun-20 2:33
professionalSander Rossel5-Jun-20 2:33 
GeneralRe: Facebook AI Bubble Pin
W Balboos, GHB5-Jun-20 3:26
W Balboos, GHB5-Jun-20 3:26 
GeneralRe: Facebook AI Bubble Pin
Daniel Pfeffer5-Jun-20 3:18
professionalDaniel Pfeffer5-Jun-20 3:18 
GeneralRe: Facebook AI Bubble Pin
W Balboos, GHB5-Jun-20 3:23
W Balboos, GHB5-Jun-20 3:23 
RantI'm about to give up on web development... Pin
Sander Rossel4-Jun-20 12:22
professionalSander Rossel4-Jun-20 12:22 
I have an ASP.NET Core Razor Pages project, some JavaScript libraries, some CSS and some SCSS.
In the past I've used Gulp to transpile and minify/uglify my front-end resources, but I understood Webpack is the latest rage.
I never liked Gulp all that much anyway so I find me a nice blog on setting up Webpack and all is fine.
Except that jQuery is now undefined.
Lots of Googling and apparently I need something like this.
JavaScript
import $ from 'jquery/dist/jquery';
window.jQuery = $;
window.$ = $;
import 'bootstrap';
import '@fortawesome/fontawesome-free';
import Vue from 'vue/dist/vue';
So that looks like four different methods to get the same thing.
Especially the jQuery thing was somehow hard to find.
It has something to do with jQuery being an old package that doesn't use the latest standards.
But it gets better.

Everything works now, except if I want my JavaScript and CSS in separate files.
Lots of Googling later and I've found some plugins that I need.
It seems kind of impossible to generate separate files, but I got it working if I'm willing to accept an extra JavaScript file that's generated with my CSS file.
I even got in the SCSS transpiler, uglyfier and minifiers.
For some reason the 'style-loader' that everyone seems to use for CSS files generates JavaScript.
After lots of Googling I even got rid of all the overhead Webpack generates.
The default code generation actually makes heavy use of eval("...") WTF | :WTF:
But I've got all of that out of the way, so that's a win.

Except that whenever I make a change to any JavaScript or (S)CSS I need to run "npm run build" to build the entire frigging thing again!
Luckily, I found some .NET middleware that watches your files and run npm build automatically if anything changes.
Well tough luck because that's deprecated and no good alternative is offered.
Now I have to install a Webpack server, if I want to get serious with Vue I need to install a Vue server as well.
I'll probably revert to just using my original JavaScript files in development mode.

This sh*t cost me hours to set up and development just became harder.
The documentation is horrible and all over the place.
For every little thing I need I have to install a new npm library that comes with a gazillion dependencies (actually, I've got 576 folder in my node_modules for a total of just over 90 MB).
Just when you think you've got it, you bump into some problem and you need an extra package or, if you're unlucky, completely replace the one you're using and start over.
WHY THE HELL IS WEBPACK SO POPULAR!? WTF | :WTF:
Unfortunately, this was the same reason that I didn't like Gulp and that I don't like those front-end testing frameworks or any front-end work for that matter.
Front-end is a mess and despite (or because) all the tooling it's not getting any better Sigh | :sigh:

GeneralRe: I'm about to give up on web development... Pin
Greg Utas4-Jun-20 12:39
professionalGreg Utas4-Jun-20 12:39 
GeneralRe: I'm about to give up on web development... Pin
Richard Andrew x644-Jun-20 12:41
professionalRichard Andrew x644-Jun-20 12:41 
GeneralRe: I'm about to give up on web development... Pin
Kevin Marois4-Jun-20 13:58
professionalKevin Marois4-Jun-20 13:58 
GeneralRe: I'm about to give up on web development... Pin
Sander Rossel4-Jun-20 22:59
professionalSander Rossel4-Jun-20 22:59 
GeneralRe: I'm about to give up on web development... Pin
Dan Neely5-Jun-20 2:24
Dan Neely5-Jun-20 2:24 
GeneralRe: I'm about to give up on web development... Pin
Greg Utas5-Jun-20 2:30
professionalGreg Utas5-Jun-20 2:30 
GeneralRe: I'm about to give up on web development... Pin
Dan Neely5-Jun-20 2:33
Dan Neely5-Jun-20 2:33 
GeneralRe: I'm about to give up on web development... Pin
Greg Utas5-Jun-20 2:39
professionalGreg Utas5-Jun-20 2:39 
GeneralRe: I'm about to give up on web development... Pin
Dan Neely5-Jun-20 2:43
Dan Neely5-Jun-20 2:43 
GeneralRe: I'm about to give up on web development... Pin
DRHuff5-Jun-20 5:33
DRHuff5-Jun-20 5:33 
GeneralRe: I'm about to give up on web development... Pin
kalberts5-Jun-20 5:52
kalberts5-Jun-20 5:52 
GeneralRe: I'm about to give up on web development... Pin
Eddy Vluggen4-Jun-20 12:43
professionalEddy Vluggen4-Jun-20 12:43 
GeneralRe: I'm about to give up on web development... Pin
Sander Rossel4-Jun-20 23:06
professionalSander Rossel4-Jun-20 23:06 
GeneralRe: I'm about to give up on web development... Pin
Marc Clifton4-Jun-20 13:41
mvaMarc Clifton4-Jun-20 13:41 
GeneralRe: I'm about to give up on web development... Pin
Greg Utas4-Jun-20 14:04
professionalGreg Utas4-Jun-20 14:04 
GeneralRe: I'm about to give up on web development... Pin
den2k884-Jun-20 20:45
professionalden2k884-Jun-20 20:45 
GeneralRe: I'm about to give up on web development... Pin
Sander Rossel4-Jun-20 23:18
professionalSander Rossel4-Jun-20 23:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.