web-component-analyzer icon indicating copy to clipboard operation
web-component-analyzer copied to clipboard

Is any possability to use API in web-worker?

Open kaifaty opened this issue 3 years ago • 0 comments

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?

kaifaty avatar Jan 12 '23 07:01 kaifaty