I am trying to develop a little electron angular2 application based on this tutorial
It seems their is some error with the bundling of webpack, because i cant requir
Solved it
const electron = require('electron');
const remote = electron.remote;
Are you new to TypeScript? Did you installed it? You can install it by:
npm install -g typescript
Your solutions is a java script solutions, which is an ok hack if that's what you are looking for, but if you want to use TypeScript, then you should be able to make it work using 'import'.
Do the tutorial in: https://www.npmjs.com/package/typescript
Also, check: TS2307: Cannot find module 'angular2/core' while importing Angular2 on TypeScript
Try adding target: "electron-renderer"
to the bottom of the module.exports
object in your webpack config. (mine was created via ng eject
via the Angular CLI)