When calling bundle / bundleAsync with CSS Modules enabled, consumers can provide either an absolute path or a cwd relative path for the filename option, but this means that hashes would be unstable depending on the current working directory. In order to ensure hashes are stable, it would be nice to have a cwd option too, e.g.
lightningcss.bundle({
filename: 'styles/index.css',
cwd: appRootDirectory,
cssModules: {
pattern: "[hash]_[name]_[local]"
},
});