I try this in renderer.js
import * as math from './math.js'
I get error: Uncaught SyntaxError: Cannot use import statement outside a module
Thanks to comment I solve this. I add type="module" and change to
type="module"
const math = require("./math.js")