[Parcel] Bundle a React App with Parcel
2023-09-14 08:59:17 时间
Parcel comes in as the new cool kid in the bundlers world. Unlike other bundlers which take lots of explicit configuration, Parcel works out of the box and requires almost zero-configuration by intelligently inferring it depending on what you use in your code.
This lessons shows you how to bundle a simple React app starting from scratch and having hot-reloading, dev-server and generating an optimised bundle with no configuration and only 4 dependencies.
Install:
yarn global add parcel-bundler
npm install -g parcel-bundler
Package.json:
{ "name": "react-parcel", "version": "1.0.0", "main": "index.js", "scripts": { "start": "parcel index.html", "build": "parcel build index.html" }, "author": "", "license": "MIT", "devDependencies": { "babel-preset-react-app": "^3.1.0", "parcel-bundler": "^1.1.0" }, "dependencies": { "react": "^15.6.1", "react-dom": "^15.6.1" } }
相关文章
- 全流程:安装uni-app(小程序端)
- Android AB升级(二) - Demo APP应用流程
- uni-app修改vuex里面的数据,返回上一页面时数据不刷新的问题
- uni-app引入sortable列表拖拽,兼容App和H5
- 网页游戏制作_怎么制作app软件
- 苹果APP版本发布流程(二)
- java基于springboot外卖系统在线订餐系统app源码厨艺论坛APP
- 2018最新苹果APP上架App Store流程(超详细)
- APP成本评估:安卓app系统软件开发费用明细一览表
- Application Loader及Transporter App上传ipa外、可以在Windows上架iOS APP工具
- Application Loader及Transporter App上传ipa外、可以在Windows上架iOS APP工具
- 一分钟让您的APP支持AVIF图片
- Ratchet:使用 HTML,JS,CSS 创建 iPhone App 原型
- 如何用苹果app完成ipa安装
- 最佳Linux学习之路:一款轻松促进学习的App(学linux的app)
- Linux学习之路,体验移动APP的魅力(linux学习app)
- 肯德基APP上乘体验Redis助力(肯德基app redis)
- 轻松实现优化App与MySQL连接速度(app连接mysql很慢)
- 拓展业务用App组合MySQL实现跨平台数据共享(app组合mysql)
- 学习MYSQL必备下载一款视频APP,轻松入门数据库技术(MYSQL下载视频app)