- Complete React app with 7 developer tools - JSON Tool with visual structured editor - Serialize Tool with visual structured editor - URL, Base64, CSV/JSON, Beautifier, Diff tools - Responsive navigation with dropdown menu - Dark/light mode toggle - Mobile-responsive design with sticky header - All tools working with copy/paste functionality
26 lines
634 B
JavaScript
26 lines
634 B
JavaScript
const { d, n } = require('../../options');
|
|
|
|
/**
|
|
* Normalizes the options for the loader.
|
|
* @param {import('../types').ReactRefreshLoaderOptions} options Non-normalized loader options.
|
|
* @returns {import('../types').NormalizedLoaderOptions} Normalized loader options.
|
|
*/
|
|
const normalizeOptions = (options) => {
|
|
d(options, 'const', false);
|
|
|
|
n(options, 'esModule', (esModule) => {
|
|
if (typeof esModule === 'boolean' || typeof esModule === 'undefined') {
|
|
return esModule;
|
|
}
|
|
|
|
d(esModule, 'include');
|
|
d(esModule, 'exclude');
|
|
|
|
return esModule;
|
|
});
|
|
|
|
return options;
|
|
};
|
|
|
|
module.exports = normalizeOptions;
|