mirror of
https://github.com/documentationjs/documentation.git
synced 2026-01-25 14:26:29 +00:00
feat: Support the .mjs extension by default. (#1023)
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.
This commit is contained in:
parent
487336fcd8
commit
b8a7e0ddc2
@ -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,
|
||||
|
||||
@ -84,6 +84,7 @@ function mergeConfigFile(config): Promise<Object> {
|
||||
|
||||
function mergeConfig(config: Object): Promise<DocumentationConfig> {
|
||||
config.parseExtension = (config.parseExtension || []).concat([
|
||||
'mjs',
|
||||
'js',
|
||||
'jsx',
|
||||
'es5',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user