Preload is not loading in mac

my application was working fine on mac and windows before i added preload.js . now the app works fine on windows not on mac .I can see the preload is not loading but don’t understand why

   let win = new BrowserWindow({
    width: 1000,
    height: 600,
    show: true,
    webPreferences: {
        nativeWindowOpen: true,
        nodeIntegration: false,
        preload: `${__dirname}/preload.js`
    // , icon: path.join(app.getAppPath(), '/web/css/images/favicon.ico')