综合编程

Parcel bundler: Like Webpack but effortless

微信扫一扫,分享到朋友圈

Parcel bundler: Like Webpack but effortless
0

One of my least favorite things about starting new JavaScript projects is setting up all the configuration needed to write modern JavaScript. I happily refused to commit Webpack configuration to memory, but the result is an unpleasant feeling whenever I’m starting a project.

If I’m writing a React app, which is most of the time, the problem is solved for the most part with the create-react-app
scaffolding tool. Leveraging react-scripts
, all of the gnarly Webpack configuration is hidden away until you eject.

But when I started my recent series on generative art, I ended up borrowing an ES6 starter project and adding a bit of boilerplate for P5.js. Copying and pasting the scaffolding of a project works fine, but when someone referred me to Parcel
, I jumped at the chance to evaluate it. I’m going to take the P5.js ES6 starter
I put together for the first generative art column
and rewrite it using Parcel to see how it works.

Parcel bundler in action

In my eyes, the “Hello World” example on the Parcel website
claims you can simply write HTML, CSS, and JavaScript using all the new and fancy ES6 features and you don’t have to write any configuration at all. Just install the parcel-bundler
package and point it at your main HTML file. Any of the transforms, transpilations, packaging, and even dependency installations are taken care of for you. Truly? Let’s see.

阅读原文...


微信扫一扫,分享到朋友圈

Parcel bundler: Like Webpack but effortless
0

InfoWorld News

我们的产品,如何被用户评价

上一篇

Scaling, automatically and manually – The Isoblog.

下一篇

评论已经被关闭。

插入图片

热门分类

往期推荐

Parcel bundler: Like Webpack but effortless

长按储存图像,分享给朋友