You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ability to name the configuration file config.cjs (for CommonJS), and/or express configuration as an ES6 module.
What problem does this feature solve?
Currently (VuePress 1.5.2) it seems the configuration file must be config.js and that file must be given with CommonJS export syntax.
The world is in between two module eras, and projects start using ES6 modules. There is a convention about doing this in Node, defining "type": "module" in package.json (to default .js to ES6 module loading) and a recommendation of naming files explicitly to .cjs for CommonJS and .mjs for ES6.
VuePress is not acting according to such convention.
What does the proposed API look like?
One would be able to get configuration via either config.cjs, config.mjs or the default interpretation of config.js. At the least, I would like config.cjs to be found.
How should this be implemented in your opinion?
Unfortunately, I don't have insight about this.
Are you willing to work on this yourself?
I can help test a PR.
The text was updated successfully, but these errors were encountered:
Feature request
Ability to name the configuration file
config.cjs
(for CommonJS), and/or express configuration as an ES6 module.What problem does this feature solve?
Currently (VuePress 1.5.2) it seems the configuration file must be
config.js
and that file must be given with CommonJS export syntax.The world is in between two module eras, and projects start using ES6 modules. There is a convention about doing this in Node, defining
"type": "module"
inpackage.json
(to default.js
to ES6 module loading) and a recommendation of naming files explicitly to.cjs
for CommonJS and.mjs
for ES6.VuePress is not acting according to such convention.
What does the proposed API look like?
One would be able to get configuration via either
config.cjs
,config.mjs
or the default interpretation ofconfig.js
. At the least, I would likeconfig.cjs
to be found.How should this be implemented in your opinion?
Unfortunately, I don't have insight about this.
Are you willing to work on this yourself?
I can help test a PR.
The text was updated successfully, but these errors were encountered: