Hacker News new | ask | show | jobs
by ratww 2430 days ago
> If I can't just include a file things are going to get more complex.

But the tooling and npm packages are all optional. You can import React from a CDN and use stuff like htm [1] or domz [2] instead of a JSX compilation step.

Or you can use Vue instead of React (their tutorial starts by using Vue via CDN).

If you're able to only support 95% of the browsers, you can use most modern ES6 features, including ES Modules and async/await.

If you still need the tooling, there are options like Parcel [3] or Poi.js [4] that require zero configuration. You don't really need the complexity of Webpack.

--

[1] https://www.npmjs.com/package/htm

[2] https://www.npmjs.com/package/domz

[3] https://www.npmjs.com/package/parcel

[4] https://www.npmjs.com/package/poi

1 comments

I've used vue by including it. I've used react by including it and babel.

When I tried to include other packages they were only available through npm (some had cdn versions but most did not). You don't get access to the entire ecosystem without the tooling.

You can use a site like https://unpkg.com/ to include files from most npm packages using a script tag.