(configPath: string)
| 56 | } |
| 57 | |
| 58 | export async function getWebpackConfig(configPath: string): Promise<Configuration> { |
| 59 | if (!existsSync(configPath)) { |
| 60 | throw new Error(`Webpack configuration file ${configPath} does not exist.`); |
| 61 | } |
| 62 | |
| 63 | const config = await import(configPath); |
| 64 | |
| 65 | return 'default' in config ? config.default : config; |
| 66 | } |
no test coverage detected