fite/lib/thread.js

19 lines
572 B
JavaScript

/**
* 子线程
* @author yutent<yutent.io@gmail.com>
* @date 2023/06/14 16:15:39
*/
import { workerData } from 'node:worker_threads'
import { compileFiles } from './compile.js'
const { options, data } = workerData
options.isCustomElement = Function('return ' + options.isCustomElement)()
console.log('data: ', data.title, Date.now() - data.timeStart)
// for (let [currentPage, { page, files }] of data.chunk.entries()) {
// currentPage && console.log('正在生成 %s ...', `${currentPage}.html`)
// compileFiles(currentPage, page, files, options, data)
// }
vue3的轻量构建工具。webpack/vite的替代品
JavaScript 100%