Closed bennettrogers closed 1 year ago
Hi @bennettrogers, this was changed on https://github.com/django-webpack/webpack-bundle-tracker/pull/91
We still have the outputChunkDir
variable and we use it:
https://github.com/django-webpack/webpack-bundle-tracker/blob/8a517eea7b30e8ac47ce5a7d2d93eca356fe8e52/lib/index.js#L71
but only if the filename is a relative path: https://github.com/django-webpack/webpack-bundle-tracker/blob/8a517eea7b30e8ac47ce5a7d2d93eca356fe8e52/lib/index.js#L161-L163
Are you passing a relative filename path? Or does it have a leading /
?
@fjsj There might be some confusion here, the webpack-stats.json
file seems to not be respecting the path
option provided in options and is now just writing the stats file in the pwd. Your response seems to be in relation to publicPath
that's written for each chunk. This is a bug with the path to webpack-stats.json
I can confirm I've worked around the bug by using an absolute filename. If this is intentional then perhaps the docs need updating?
Broken:
new BundleTracker({
path: OUTPUT_DIRECTORY,
filename: 'webpack-stats.json'
})
Workaround:
new BundleTracker({
filename: path.join(
OUTPUT_DIRECTORY,
'webpack-stats.json'
})
same here, upgraded from 0.4.2 to 1.8.0
not a big deal, as a workaround mentioned above is perfectly fine, but d.ts tells me, that I should be able to use this (broken) option, which is confusing
So I think the issue is on typings.d.ts Thanks for reporting @vasili4396 If you can/want open a PR solving this, please feel free.
It seems that setting the
path
option in the BundleTracker options no longer has an effect. I think the issue was introduced in this commit. Regardless of what thepath
option is set to, the stats file is rooted in the cwd.It's possible to work around the issue by specifying the full file path in the
filename
option.