From 413de2c95a3fcd1418a62405b6381b5da3e3c319 Mon Sep 17 00:00:00 2001 From: Jayden Seric Date: Wed, 28 Feb 2018 11:27:00 +1100 Subject: [PATCH] Support the .mjs extension by default. Fixes https://github.com/documentationjs/documentation/issues/1022. `.mjs` is ordered before `.js` as that is the resolution order in other tools such as Webpack v4. --- src/input/dependency.js | 2 +- src/merge_config.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/input/dependency.js b/src/input/dependency.js index 95eac7ae6..00fdeffb5 100644 --- a/src/input/dependency.js +++ b/src/input/dependency.js @@ -32,7 +32,7 @@ function dependencyStream( extensions: [] .concat(config.requireExtension || []) .map(ext => '.' + ext.replace(/^\./, '')) - .concat(['.js', '.json', '.es6', '.jsx']), + .concat(['.mjs', '.js', '.json', '.es6', '.jsx']), transform: [ babelify.configure({ sourceMap: false, diff --git a/src/merge_config.js b/src/merge_config.js index a14a49877..65126cf4c 100644 --- a/src/merge_config.js +++ b/src/merge_config.js @@ -84,6 +84,7 @@ function mergeConfigFile(config): Promise { function mergeConfig(config: Object): Promise { config.parseExtension = (config.parseExtension || []).concat([ + 'mjs', 'js', 'jsx', 'es5', pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy