|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
634 bytes
|
| Line | |
|---|
| 1 | const { d, n } = require('../../options');
|
|---|
| 2 |
|
|---|
| 3 | /**
|
|---|
| 4 | * Normalizes the options for the loader.
|
|---|
| 5 | * @param {import('../types').ReactRefreshLoaderOptions} options Non-normalized loader options.
|
|---|
| 6 | * @returns {import('../types').NormalizedLoaderOptions} Normalized loader options.
|
|---|
| 7 | */
|
|---|
| 8 | const normalizeOptions = (options) => {
|
|---|
| 9 | d(options, 'const', false);
|
|---|
| 10 |
|
|---|
| 11 | n(options, 'esModule', (esModule) => {
|
|---|
| 12 | if (typeof esModule === 'boolean' || typeof esModule === 'undefined') {
|
|---|
| 13 | return esModule;
|
|---|
| 14 | }
|
|---|
| 15 |
|
|---|
| 16 | d(esModule, 'include');
|
|---|
| 17 | d(esModule, 'exclude');
|
|---|
| 18 |
|
|---|
| 19 | return esModule;
|
|---|
| 20 | });
|
|---|
| 21 |
|
|---|
| 22 | return options;
|
|---|
| 23 | };
|
|---|
| 24 |
|
|---|
| 25 | module.exports = normalizeOptions;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.