webpack: Cache bundles to filesystem
| @@ -1,8 +1,14 @@ | ||
| 1 | +import process from 'node:process'; | |
| 2 | +import path from 'node:path'; | |
| 3 | + | |
| 1 | 4 | /** @type {import('webpack').Configuration} */ |
| 2 | 5 | export const publicLibConfig = { |
| 3 | 6 | mode: 'production', |
| 4 | 7 | entry: './public/lib.js', |
| 5 | 8 | cache: true,{ |
| 9 | + type: 'filesystem', | |
| 10 | + cacheDirectory: path.resolve(process.cwd(), 'dist/webpack'), | |
| 11 | + }, | |
| 6 | 12 | devtool: false, |
| 7 | 13 | module: {}, |
| 8 | 14 | stats: { |