18 lines
563 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

export default (api) => {
api.describe({
key: 'exportStatic',
config: {
schema(joi) {
return joi.object({
htmlSuffix: joi.boolean(),
dynamicRoot: joi.boolean()
});
}
},
// TODO: api.EnableBy.config 读取的 userConfigmodifyDefaultConfig hook 修改后对这个判断不起效
enableBy: () => ('exportStatic' in api.userConfig
? api.userConfig.exportStatic
: api.config?.exportStatic)
});
};