0

我通常使用gulp-useref来连接 js 文件并最终输出一个带有对该生成文件的引用的 html。这很好用,并且在各种项目中都派上了用场。我想知道除了 js 文件中的导入模块之外,做类似事情的方法是什么?例如:

// build:js libs.js
import a from 'moduleA.js'
import b from 'moduleB.js'
import c from 'moduleC.js'
// endbuild

// other modules I don't want to concatenate
import d from 'moduleD.js'
//...

我猜这会导致类似

import { a, b, c } from 'libs.js'
// other modules I don't want to concatenate
import d from 'moduleD.js'
//...

像这样的东西作为 gulp 插件存在吗?

4

0 回答 0