PARCELJS如何创建一个捆绑文件而不是每个文件?
我有一个带包裹的简单项目设置:
/** main.js */
console.log("Hey")
/** tools.js */
console.log("Hoo")
当我运行包裹时,它会创建两个文件: main.js 和 tools.js 。但是,我很想将其捆绑到一个展位源代码中的文件。这样:
/** bundle.js */
console.log("Hoo")
console.log("Hey")
我该如何实现?
这是我的构建命令包裹构建./src/**/*。js
。目标环境是浏览器。
I have a simple project setup with parcel:
/** main.js */
console.log("Hey")
/** tools.js */
console.log("Hoo")
When I run parcel it creates two files: main.js and tools.js. However I would love to have it bundle to one file where booth source codes are in it. Like this:
/** bundle.js */
console.log("Hoo")
console.log("Hey")
How can I achieve this?
This is my build command parcel build ./src/**/*.js
. The target environment is the browser.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论