Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

What should we do with this warning ? #395

bric3 started this conversation in General
Discussion options

My config is a JS file, with several const and one module.exports = { } and I see this warning

No default export found for configuration namespace, assuming legacy config

That said I'm unsure what it is expected. The code that emits this warning is

export function getConfiguration(namespace: string): Config {
 const namespaceObj = (self as any)[namespace];
 if (namespaceObj) {
 if (namespaceObj.default) {
 return namespaceObj.default;
 } else {
 console.warn(
 "No default export found for configuration namespace, assuming legacy config"
 );
 return namespaceObj;
 }
 }
 throw new Error(
 "Could not find configuration object, please check your config file and make sure it has a default export."
 );
}
You must be logged in to vote

Replies: 1 comment 1 reply

Comment options

This warns about using the module.exports = CommonJS style modules that Finicky v3 used. Finicky v4 can technically support both but it is easier to just support the export default ES module syntax.

I'll update this warning to be more specific, thanks!

You must be logged in to vote
1 reply
Comment options

Ah OK, this is very simple then. Barely this change :

- module.exports = {
+ export default {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /