(rawOptions, loaderContext)
| 665 | } |
| 666 | |
| 667 | function normalizeOptions(rawOptions, loaderContext) { |
| 668 | const exportType = |
| 669 | typeof rawOptions.exportType === "undefined" |
| 670 | ? "array" |
| 671 | : rawOptions.exportType; |
| 672 | const esModule = |
| 673 | typeof rawOptions.esModule === "undefined" ? true : rawOptions.esModule; |
| 674 | const modulesOptions = getModulesOptions( |
| 675 | rawOptions, |
| 676 | esModule, |
| 677 | exportType, |
| 678 | loaderContext, |
| 679 | ); |
| 680 | |
| 681 | return { |
| 682 | url: typeof rawOptions.url === "undefined" ? true : rawOptions.url, |
| 683 | import: typeof rawOptions.import === "undefined" ? true : rawOptions.import, |
| 684 | modules: modulesOptions, |
| 685 | sourceMap: |
| 686 | typeof rawOptions.sourceMap === "boolean" |
| 687 | ? rawOptions.sourceMap |
| 688 | : loaderContext.sourceMap, |
| 689 | importLoaders: |
| 690 | typeof rawOptions.importLoaders === "string" |
| 691 | ? parseInt(rawOptions.importLoaders, 10) |
| 692 | : rawOptions.importLoaders, |
| 693 | esModule, |
| 694 | exportType, |
| 695 | }; |
| 696 | } |
| 697 | |
| 698 | function shouldUseImportPlugin(options) { |
| 699 | if (options.modules.exportOnlyLocals) { |
no test coverage detected