* @param {import("../").Configuration} options options
(options)
| 137 | * @param {import("../").Configuration} options options |
| 138 | */ |
| 139 | function processOptions(options) { |
| 140 | options.context = examplePath; |
| 141 | options.output = options.output || {}; |
| 142 | options.output.pathinfo = true; |
| 143 | options.output.path = path.join(examplePath, "dist"); |
| 144 | options.output.publicPath = "dist/"; |
| 145 | if (!options.entry) options.entry = "./example.js"; |
| 146 | if (!options.plugins) options.plugins = []; |
| 147 | // Only filesystem-cache examples have a persistent store that can |
| 148 | // fail; capture infra logs so a store/restore failure (emitted |
| 149 | // during the idle store on close) fails the build. |
| 150 | if ( |
| 151 | options.cache && |
| 152 | typeof options.cache === "object" && |
| 153 | options.cache.type === "filesystem" |
| 154 | ) { |
| 155 | usesFilesystemCache = true; |
| 156 | options.infrastructureLogging = { |
| 157 | ...options.infrastructureLogging, |
| 158 | debug: true, |
| 159 | console: createLogger(infraStructureErrors) |
| 160 | }; |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | const webpack = require(".."); |
| 165 |
no test coverage detected