Answer the question
In order to leave comments, you need to log in
Why doesn't Electronjs see exports after it starts?
Good afternoon, I am currently writing an application using ElectronJS and Typescript.
Here is my application structure: Dependency
files:
tsconfig.json (I wrote tsc --init , changed rootDir value to "./src", and outDir value to "./dist")
package.json - there are two scripts, first just starts the tsc compiler and copies the .html/.css folder to the dist folder, and the second one runs the first script and then runs electron.
Here they are:
"build": "tsc && cp -r public dist",
"devStart": "npm run build && electron ./dist/main.js"
<script defer src="../../publicScripts/index.js"></script>
import { generateScramble } from './exports/scrambleGenerator';
export function generateScramble(scrambleLen: number): string { // какой-то умный код }
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question