中文手册:http://www.itbaby.me/doc/parcel/

学习代码:https://github.com/xuhuihui/parcel

1.首先使用 Yarn 或 npm 安装 Parcel :

Yarn:

yarn global add parcel-bundler

npm:

npm install -g parcel-bundler

2.使用以下命令在你的项目目录中创建一个 package.json 文件:

yarn init -y

or

npm init -y

3.创建一个 index.html 和 index.js 文件,在index.html 引入 index.js 文件。

parcel学习过程(一)--项目启动

4.输入parcel index.html,运行成功。

parcel学习过程(一)--项目启动

5.重新修改页面结构,重启parcel index.html。

parcel学习过程(一)--项目启动

other.css

.title {  text-align: center;  color: red;}

index.css

@import './other.css'
实现效果

parcel学习过程(一)--项目启动


相关文章:

  • 2021-12-29
  • 2022-01-14
  • 2021-05-01
  • 2021-04-08
  • 2022-03-08
  • 2022-12-23
  • 2021-11-17
  • 2021-04-14
猜你喜欢
  • 2022-12-23
  • 2021-05-03
  • 2022-02-27
  • 2022-12-23
  • 2021-07-14
  • 2021-11-06
  • 2021-12-12
相关资源
相似解决方案