blog.negative9.net/contents/articles/fuck-webpack/index.md

66 lines
2.5 KiB
Markdown

---
title: Fuck Webpack, ES6 is HERE!
author: geoff-doty
date: 2017-12-24
template: article.jade
---
I know. I know. Blasphame, but I really hate [Webpack](https://webpack.js.org/), not the idea of it but what it turned web development into - a bloated tangled mess of **shit you don't need**.
Lets take a jaded closer look...
## Webpack
[Webpack](https://webpack.js.org/) became the defacto go-to solution to get the latest [es6](http://es6-features.org) javascript language functionality into a developers pipeline via transpilers like [Babeljs](https://babeljs.io/) and support the overly bloated non-standard web component soultion as the [ReactJS](https://reactjs.org/) framework (batteries NOT included). Sure [Webpack](https://webpack.js.org/) does more or can do more, but in the end developers just want to develop with [es6](http://es6-features.org) features, **however** this was only supose to be a temporay *polyfill*, until browsers started supporting the next version of Javascript -- ES6.
ES6 is HERE
99% of the browsers support it, even Microsoft Edge, Safari, Chrome, Opera, Firefox...
But WebPack left us for this constant jonesing that put a permanent handycap on web developers that reminds me of those old drug commercials
"I work more, so I can do more drugs, so I can work more..."
mantra turned to become
"I work more, so I can add more configuration, so I can work more..."
Dont know about you, but dicking around with configurations all day, and watching build processes move ever S L O W E R is not what I signed up for.
So...
**PULL THE FUCKING PLUG!**
Stop getting distracted by the *shiny* future that *may* never come, and focus on the here and now. **Here** and **now** is pretty awesome. We have native ES6 language support in all evergreen browsers.
No webpack.
No configuration.
No bullshit.
Write the code you love, and free yourself from the **shit you dont need.**
### How Does it work
Everything starts with your `index.html` page, or what ever html page your building, and you turn your `script` includes from this
<script src="mycode.js"></script>
into this
<script type="module" src="mycode.js"></script>
and those lazy import statements you have that dont include the extension
import Code from './src/Code';
should have the extension
import Code from './src/Code.js';
and everything is right with the world and we can find peace and happyness for all.
**FUCK WEBPACK! ES6 IS HERE**