(options = {})
| 8 | * @returns {import("webpack").Compiler | import("webpack").MultiCompiler} compiler |
| 9 | */ |
| 10 | export default function getCompiler(options = {}) { |
| 11 | const compiler = webpack( |
| 12 | Array.isArray(options) |
| 13 | ? options |
| 14 | : { |
| 15 | mode: "production", |
| 16 | bail: true, |
| 17 | entry: path.resolve(__dirname, "../fixtures/entry.js"), |
| 18 | optimization: { |
| 19 | minimize: false, |
| 20 | }, |
| 21 | output: { |
| 22 | pathinfo: false, |
| 23 | path: path.resolve(__dirname, "dist"), |
| 24 | filename: "[name].js", |
| 25 | chunkFilename: "[id].[name].js", |
| 26 | }, |
| 27 | plugins: [], |
| 28 | ...options, |
| 29 | }, |
| 30 | ); |
| 31 | |
| 32 | compiler.outputFileSystem = createFsFromVolume(new Volume()); |
| 33 | |
| 34 | return compiler; |
| 35 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…