django-webpack / webpack-bundle-tracker

Spits out some stats about webpack compilation process to a file
MIT License
268 stars 107 forks source link

@sentry/webpack-plugin deletefilesafterupload Breaks Build #117

Open Dresdn opened 1 year ago

Dresdn commented 1 year ago

When using the deletefilesafterupload from @sentry/webpack-plugin with webpack-bundle-tracker, webpack throws an error of Error: ENOENT: no such file or directory, open 'path/to/file.map'

I assume this has to do with how generated files are handled/passed from one plugin to the next, so when the Sentry plugin removes them, that throws a wrench in things.

One option would also be to add an ignore option.

[webpack-cli] Error: ENOENT: no such file or directory, open '/project/path/build/js/user_settings.de3c34eb.js.map'
    at Object.openSync (node:fs:601:3)
    at Object.readFileSync (node:fs:469:35)
    at getSource (/project/path/node_modules/webpack-bundle-tracker/lib/index.js:31:13)
    at /project/path/node_modules/webpack-bundle-tracker/lib/index.js:180:53
    at /project/path/node_modules/lodash.foreach/index.js:221:11
    ...