5

Front-end web development is like a fucking cancer to me right now

I need the following behavior from my development environment if I don't want the webdev experience to destroy my sanity and tempt me into suicide by making me waste my valuable lifetime configuring shit that is ultimately meaningless to the software I'm trying to create:

- I should be able to open the webpage in the browser at localhost:<some-port>
- the page should refresh immediately as I save my files
- I should be able to import node modules installed with npm without using a script tag linking to some CDN (for instance, I want to do a get request with axios instead of the fetch API)
- I should be able to do this without spending more than two minutes reading the documentation for a tool that would enable me to do it, ideally without ever coming even close to touching a configuration file

Right now I know about browser-sync and webpack, or webpack-dev-server or some such fucking shit fuck fucking fuck.

browser-sync seems to fulfill most of these needs, except that I can't seem to bring npm modules into my application and import them. Webpack seems to be able to do this, but at the cost of slowly throwing my life away reading documentation for over-complicated configuration files that do not aid me in actual software creation and therefore do not interest me and never will, all in the hope that I *may* at some point dig out enough shit to find how to do such a use case (i.e. seamless, smooth web development) that to me feels reasonably common and expected.

Is there some tool that enables me to do *seamless*, pleasurable web development without the hassles of over-complication and over-engineering? Is there some hidden command for webpack that allows me to run such simple shit without ever needing to edit some pointless configuration file?

Please, I beg of you, let me know.

Comments
  • 3
    Ever tried:
    - Live Server (or similar extension on your editor/IDE)?
    - Bundlers like Parcel, Rollup and Snowpack (all of which are much easier to setup than Webpack)?
    - How about Vite?

    Also why the flip, are you importing node modules into the browser like this? Use their CDN versions or import it in your code then bundle it and use that bundle in your HTML (although some tools do that for you).
  • 2
    Most NPM modules which are usable in browser provide a method to do so within documentation, if they haven't, it's not supported, apart from that, tools like skypack.dev allow what you want, but you need script tag to import, so, not gonna happen the way you described.
  • 2
    HTML, CSS, JS, PHP

    You can do anything a framework does without the framework.

    Imagine you are building a picnic table.

    A framework is an entire garage filled with shiny brand new tools.

    Thing is, you only need a hammer, saw, and nails.
  • 1
    @Berkmann18

    Sorry, I posted this rantzy question and went to sleep in frustration

    So the best practice really is to use the CDN versions? Well, makes sense. I hadn't tried any of those but will do now, thanks for pointing them out.
  • 1
    @ostream Oh, that makes sense. Ironically it's why some people write their own personal frameworks, I guess, lol
  • 2
    @nururururu Well, if you're going to use packages and import them into an HTML page, it will be safer and more reliable to use their CDN link unless you use Node.js or can import said packages into your code using import/require.
  • 1
    @HiFiWiFiSciFi Oh, uuuuuh I'm prejudiced against PHP, but I see your point, and it's fair enough.
  • 2
    @Berkmann18 Indeed, indeed, I guess, hahah
Add Comment