fite/lib/thread.js

25 lines
551 B
JavaScript
Raw Normal View History

2023-06-14 19:36:20 +08:00
/**
* 子线程
* @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(options)
let chunk = data.chunk
delete data.chunk
chunk.forEach(([a, b]) => {
console.log(a, b)
})
// for (let [currentPage, { page, files }] of chunk.entries()) {
// compileFiles(currentPage, page, files, options, { ...data })
// }