【问题标题】:Multiple bundles in ParcelParcel 中的多个捆绑包
【发布时间】:2020-05-02 22:20:49
【问题描述】:

我正在寻找一种在 ParcelJS 中以以下格式捆绑多个组件的方法:

输入:

   -src 
   ----component1
   --------index.html
   --------main.ts
   --------class.ts

   ----component2
   --------index.html
   --------main.ts
   --------class.ts

输出:

   -dist
   ----component1
   --------index.html
   --------main.js

   ----component2
   --------index.html
   --------main.js

这可能吗?如果可以,是否可以在配置文件中定义?

【问题讨论】:

  • 你最终采用了什么解决方案?

标签: typescript bundling-and-minification parceljs


【解决方案1】:

您可以连续运行两次 Parcel。假设在每个目录中 index.html 是您可以执行的入口点:

parcel src/component1/index.html && parcel src/component2/index.html

【讨论】:

    猜你喜欢
    • 2012-11-05
    • 1970-01-01
    • 1970-01-01
    • 2017-05-08
    • 2018-11-05
    • 1970-01-01
    • 2015-03-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多