TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Jetpack – a more convenient webpack dev server

7 点作者 kn8超过 6 年前

1 comment

kn8超过 6 年前
Author here. I started working on jetpack ~2 years ago after several of my colleagues at the time asked – “how do I create a simple web app to display some data from an API I’ve built?”.<p>At first i was like, well... you could put it all in an index.html file, but realised that it’s not good enough because you can’t use npm packages, and its tricky to connect to the api and deploy such an app.<p>Then I was like, ok it’s easy, you just need – webpack, babel (for jsx or async&#x2F;await), babel plugins, webpack config, css loaders, express and nodemon… yeah, that’s a bit much. Assembling an SPA didn’t seem beginner friendly, but also I myself didn’t enjoy wiring all of those things up from scratch.<p>Then I suggested Next.js, but wrapping your head around SSR has it’s own challenges.<p>After feeling a bit frustrated that it wasn’t easy to spin up an SPA backed by an API I started working on jetpack.<p>Since then, I’ve used jetpack to launch a couple internal tools and I am now using jetpack in building my next product.<p>Its not much, just a thin webpack wrapper with preconfigured defaults. But it’s nice to have this good, simple reference of how to assemble all these different plugins and loaders to create a good foundation for an SPA.<p>One feature that sets jetpack apart from similar tools is that you don’t need to install it locally into your project. You can point it to any JavaScript file on your machine and it will serve it up in your browser. Useful for testing out libraries or ideas.<p>Achieving Jetpack’s vision – making it easy for beginners and pros to spin up an SPA – is still work in progress. But that’s mainly due to a lack of good examples or tutorials, I’m pretty happy with the tool overall at this point.