bugsnag / webpack-bugsnag-plugins

Webpack plugins for common BugSnag actions.
MIT License
32 stars 29 forks source link

Plugin does not upload *.map file #34

Closed intelcoder closed 5 years ago

intelcoder commented 5 years ago

I am not 100% sure this is bug or not. If it is not, sorry to post here.

Webpack generates about 100 chunks and file name is actually 4.js?v=8fddedf76030 I am also deleting source map files from server after source map files are uploaded to bugsnag server.

Generated chunks 4.js.map?v=8fddedf76030 558 KiB 4 [emitted] [big]
4.js?v=8fddedf76030

Webpack setup for source map devtool: 'source-map',

Plugin configuration

  new BugsnagSourceMapUploaderPlugin({
        apiKey: BUGSNAG_API_KEY,
        appVersion: version,
        publicPath: '/dist',
        overwrite: true,
      }),

What Bugsnag uploads after Webpack generated sourcemap. [BugsnagSourceMapUploaderPlugin] uploading sourcemap for "/dist/4.js?v=8fddedf76030"

And I can see uploaded file from setting -> sourcemap.

mattdyoung commented 5 years ago

Hi

I see you've also written into support@bugsnag.com so closing this and responding there as this is a support request related to how to configure the plugin.

The publicPath is definitely incorrect, this should be the full URL path you see in your stacktraces: https://docs.bugsnag.com/build-integrations/webpack/#source-map-uploader

Thanks!

intelcoder commented 5 years ago

Actually, plugin actually replace the .map to '' const source = chunk.files.find(file => map.replace('.map', '').endsWith(file))