Preload is not loading using quick-start project


#1

I’ve followed the steps to obtain the quick-start app
git clone https://github.com/electron/electron-quick-start cd electron-quick-start
$ npm install && npm start

I then added a preload.js with a valid statement, and one with a syntax error (undefined)
preload.js
window.foo = ‘the foo’;
foobar.fuReally.goat = ‘bleat’;

then in the main.js, I updated the line that is creating the browser to include the preload:
mainWindow = new BrowserWindow({width: 800, height: 600, preload: __dirname + ‘/preload.js’})

I also added an alert(window.foo); to the index.html

when I start, I get no errors, and window.foo is undefined.

I am running this on windows 8.1, I only started this morning, so I assume I’m on the latest electon.
I also just tried the exact same steps on my MAC (10.10.5) with the same results.

Todd