(config: OutputOptions)
| 147 | }; |
| 148 | |
| 149 | const getFormat = (config: OutputOptions): NormalizedOutputOptions['format'] => { |
| 150 | const configFormat = config.format; |
| 151 | switch (configFormat) { |
| 152 | case undefined: |
| 153 | case 'es': |
| 154 | case 'esm': |
| 155 | case 'module': { |
| 156 | return 'es'; |
| 157 | } |
| 158 | case 'cjs': |
| 159 | case 'commonjs': { |
| 160 | return 'cjs'; |
| 161 | } |
| 162 | case 'system': |
| 163 | case 'systemjs': { |
| 164 | return 'system'; |
| 165 | } |
| 166 | case 'amd': |
| 167 | case 'iife': |
| 168 | case 'umd': { |
| 169 | return configFormat; |
| 170 | } |
| 171 | default: { |
| 172 | return error( |
| 173 | logInvalidOption( |
| 174 | 'output.format', |
| 175 | URL_OUTPUT_FORMAT, |
| 176 | `Valid values are "amd", "cjs", "system", "es", "iife" or "umd"`, |
| 177 | configFormat |
| 178 | ) |
| 179 | ); |
| 180 | } |
| 181 | } |
| 182 | }; |
| 183 | |
| 184 | const getInlineDynamicImports = ( |
| 185 | config: OutputOptions, |
no test coverage detected
searching dependent graphs…