I'm able to do the following in webpack:
module.exports = {
...
output: {
path: path.resolve('../webpack_bundles/[hash]'),
filename: '[name].js',
},
...
};
But django-webpack-loader doesn't allow that. Here you expect to have a path to the chunk. But if the hash is in the path, it's not known in advance.
Can't we add, say, BUNDLE_DIR_PATH and do something along these lines?
import os.path
if 'BUNDLE_DIR_PATH' in self.config:
relpath = os.path.relpath(chunk['path'], self.config['BUNDLE_DIR_PATH'])
I'm able to do the following in webpack:
But
django-webpack-loaderdoesn't allow that. Here you expect to have a path to the chunk. But if the hash is in the path, it's not known in advance.Can't we add, say,
BUNDLE_DIR_PATHand do something along these lines?