-
-
Notifications
You must be signed in to change notification settings - Fork 201
-
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." ); }
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 1 reply
-
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!
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
1 reply
-
Ah OK, this is very simple then. Barely this change :
- module.exports = { + export default {
Beta Was this translation helpful? Give feedback.
All reactions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment