• Home
  • Jobs
  • Courses
  • Questions
  • Teachers
  • For business
  • ES/EN

0

21
Views
electron js: how to import custom js in renderer.js

I try this in renderer.js

import * as math from './math.js'

I get error: Uncaught SyntaxError: Cannot use import statement outside a module

about 1 month ago ·

Juan Pablo Isaza

1 answers
Answer question

0

Thanks to comment I solve this. I add type="module" and change to

const math = require("./math.js")
about 1 month ago · Juan Pablo Isaza Report
Answer question
Find remote jobs
Loading

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2022 PeakU Inc. All Rights Reserved.