runem / web-component-analyzer

CLI that analyzes web components and emits documentation
https://runem.github.io/web-component-analyzer
MIT License
503 stars 63 forks source link

Is any possability to use API in web-worker? #259

Open kaifaty opened 1 year ago

kaifaty commented 1 year ago

Now there is error inside worker:

import {analyzeText, transformAnalyzerResult} from 'web-component-analyzer'

const generate = async (path: string) => {
  const response = await fetch(path)
  const result = await response.text()
  const {results, program} = analyzeText([
    {fileName: path, text: result},
  ])

  return transformAnalyzerResult(format, results, program)
}

(0 , _fs.existsSync) is not a function'

Is it really need fs when using string?