#Cannot find module

4 messages · Page 1 of 1 (latest)

frail blaze
#

I have a html file in the src/utils directory and tried importing this file in a collection, but was unable to because it says cannot find the module.Please help me with this.

frail blaze
exotic ocean
#

HTML files cannot be imported as modules, only Javascript/Typescript. You would need to export your HTML code as a string within a JS or TS file:

// yourHtmlFile.js

export default html = `<html>...</html>`