Sourcemaps not being applied on Electron


#1

I am using Electron v4 and the @sentry/electron SDK and this is my webpack config:

    new SentryWebpackPlugin({
      release: 'codekit@1.0.10',
      include: 'build/electron',
      ignoreFile: '.sentrycliignore',
      ignore: [
        'node_modules',
        'webpack.config*.js'
      ],
      configFile: 'sentry.properties'
    })

Which uploads the bundle.js and bundle.js.map files to ~/build/electron/ on Sentry because that’s the output specified in the webpack config.

The problem I think that when an error is raised the electron app is reporting the bundle file is located at: file:///bundle.js.map so it doesn’t match the release artifact of ~/build/electron/bundle.js

When I uploaded the sourcemaps manually using the CLI directly on the root folder it started recognizing them sort of correctly. Although it was still raising an error that the location was invalid.

How can I specify on the SentryWebpackPlugin or where to upload the files and also how can I fix the Invalid location in sourcemap error?

Thanks.