0

Im trying to include this library into my electron app and it works when I start my electron app in development mode (electron-forge start). But when I build my app using electron-builder --win I get an error saying Date.today is not a function.

I included the library in my index.html like so

  <script type="text/javascript" src="js/Datejs/build/date-de-DE.js"></script>

1 Answer 1

0

Having not seen any code or folder structure, I am going to take a guess and say that when your app is built, Electron doesn't see the path to js/Datejs/build/date-de-DE.js because it's running directory is in a different folder than the js directory. In other words, the js directory was most likely excluded from the build process.

Are you sure that you are including all the right files in the build process?

Check out the documentation to see how to set the config to include different files

Sign up to request clarification or add additional context in comments.

1 Comment

Good guess, this seems to be the solution. I didn't try including the directory in the build process I just removed the library and used momentjs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.