Tuesday, May 14, 2024
 Popular · Latest · Hot · Upcoming
67
rated 0 times [  70] [ 3]  / answers: 1 / hits: 11868  / 2 Years ago, wed, september 21, 2022, 12:00:00

I am getting this error:
Syntax Error: ambiguous indirect export
in Firefox. Sadly there is nothing to find on Google...



  • This is my import:


<script type="module">
import {someFunctionINeed} from "./js/functions.js";
...
</script>


  • This is my export:


export function someFunctionINeed(cname) { ... }


  • compilerOptions from my tsconfig.json:


"compilerOptions": {
"module": "commonjs",
"target": "es5",
"sourceMap": true,
"watch": true,
"removeComments": true
}


  • and something that's maybe relevant from the package.json:


"type": "module"

What did I miss?


More From » html

 Answers
2


Ok, I found the solution: It's important to set these properties in the tsconfig.json:


"module": "ESNext",
"target": "esnext",

Otherwise it doesn't "compile" the way I need it to support importing/exporting of functions.


[#28] Wednesday, July 20, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
blaynetheoi

Total Points: 146
Total Questions: 116
Total Answers: 103

Location: India
Member since Thu, Apr 8, 2021
3 Years ago
blaynetheoi questions
Tue, Feb 16, 21, 00:00, 3 Years ago
Thu, Aug 6, 20, 00:00, 4 Years ago
Fri, Jul 10, 20, 00:00, 4 Years ago
Sun, May 24, 20, 00:00, 4 Years ago
;