Skip to content

Commit

Permalink
Fix warning URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
lukastaegert committed Jul 18, 2020
1 parent 3e82912 commit 44b13a2
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cli/run/batchWarnings.ts
Expand Up @@ -137,7 +137,7 @@ const deferredHandlers: {

MIXED_EXPORTS: warnings => {
title('Mixing named and default exports');
info(`https://rollupjs.org/guide/en/#output-exports`);
info(`https://rollupjs.org/guide/en/#outputexports`);
stderr(bold('The following entry modules are using named and default exports together:'));
const displayedWarnings = warnings.length > 5 ? warnings.slice(0, 3) : warnings;
for (const warning of displayedWarnings) {
Expand Down
6 changes: 3 additions & 3 deletions src/utils/error.ts
Expand Up @@ -162,7 +162,7 @@ export function errInvalidExportOptionValue(optionValue: string) {
return {
code: Errors.INVALID_EXPORT_OPTION,
message: `"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${optionValue}"`,
url: `https://rollupjs.org/guide/en/#output-exports`
url: `https://rollupjs.org/guide/en/#outputexports`
};
}

Expand Down Expand Up @@ -262,7 +262,7 @@ export function errMixedExport(facadeModuleId: string, name?: string) {
)}" is using named and default exports together. Consumers of your bundle will have to use \`${
name || 'chunk'
}["default"]\` to access the default export, which may not be what you want. Use \`output.exports: "named"\` to disable this warning`,
url: `https://rollupjs.org/guide/en/#output-exports`
url: `https://rollupjs.org/guide/en/#outputexports`
};
}

Expand Down Expand Up @@ -290,7 +290,7 @@ export function errPreferNamedExports(facadeModuleId: string) {
code: Errors.PREFER_NAMED_EXPORTS,
id: facadeModuleId,
message: `Entry module "${file}" is implicitly using "default" export mode, which means for CommonJS output that its default export is assigned to "module.exports". For many tools, such CommonJS output will not be interchangeable with the original ES module. If this is intended, explicitly set "output.exports" to either "auto" or "default", otherwise you might want to consider changing the signature of "${file}" to use named exports only.`,
url: `https://rollupjs.org/guide/en/#output-exports`
url: `https://rollupjs.org/guide/en/#outputexports`
};
}

Expand Down
2 changes: 1 addition & 1 deletion src/utils/options/normalizeOutputOptions.ts
Expand Up @@ -120,7 +120,7 @@ const getFormat = (config: GenericConfigObject): InternalModuleFormat => {
default:
return error({
message: `You must specify "output.format", which can be one of "amd", "cjs", "system", "es", "iife" or "umd".`,
url: `https://rollupjs.org/guide/en/#output-format`
url: `https://rollupjs.org/guide/en/#outputformat`
});
}
};
Expand Down
2 changes: 1 addition & 1 deletion test/cli/samples/warn-import-export/_config.js
Expand Up @@ -7,7 +7,7 @@ module.exports = {
assertIncludes(
stderr,
'(!) Mixing named and default exports\n' +
'https://rollupjs.org/guide/en/#output-exports\n' +
'https://rollupjs.org/guide/en/#outputexports\n' +
'The following entry modules are using named and default exports together:\n' +
'main.js\n' +
'\n' +
Expand Down
2 changes: 1 addition & 1 deletion test/cli/samples/warn-mixed-exports-multiple/_config.js
Expand Up @@ -7,7 +7,7 @@ module.exports = {
assertIncludes(
stderr,
'(!) Mixing named and default exports\n' +
'https://rollupjs.org/guide/en/#output-exports\n' +
'https://rollupjs.org/guide/en/#outputexports\n' +
'The following entry modules are using named and default exports together:\n' +
'main.js\n' +
'lib1.js\n' +
Expand Down
Expand Up @@ -13,14 +13,14 @@ module.exports = {
id: path.resolve(__dirname, 'main.js'),
message:
'Entry module "main.js" is using named and default exports together. Consumers of your bundle will have to use `chunk["default"]` to access the default export, which may not be what you want. Use `output.exports: "named"` to disable this warning',
url: 'https://rollupjs.org/guide/en/#output-exports'
url: 'https://rollupjs.org/guide/en/#outputexports'
},
{
code: 'MIXED_EXPORTS',
id: path.resolve(__dirname, 'lib1.js'),
message:
'Entry module "lib1.js" is using named and default exports together. Consumers of your bundle will have to use `chunk["default"]` to access the default export, which may not be what you want. Use `output.exports: "named"` to disable this warning',
url: 'https://rollupjs.org/guide/en/#output-exports'
url: 'https://rollupjs.org/guide/en/#outputexports'
}
]
};
2 changes: 1 addition & 1 deletion test/function/samples/export-type-mismatch-b/_config.js
Expand Up @@ -5,6 +5,6 @@ module.exports = {
code: 'INVALID_EXPORT_OPTION',
message:
'"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "blah"',
url: 'https://rollupjs.org/guide/en/#output-exports'
url: 'https://rollupjs.org/guide/en/#outputexports'
}
};
Expand Up @@ -12,14 +12,14 @@ module.exports = {
id: path.resolve(__dirname, 'main.js'),
message:
'Entry module "main.js" is using named and default exports together. Consumers of your bundle will have to use `chunk["default"]` to access the default export, which may not be what you want. Use `output.exports: "named"` to disable this warning',
url: 'https://rollupjs.org/guide/en/#output-exports'
url: 'https://rollupjs.org/guide/en/#outputexports'
},
{
code: 'MIXED_EXPORTS',
id: path.resolve(__dirname, 'lib1.js'),
message:
'Entry module "lib1.js" is using named and default exports together. Consumers of your bundle will have to use `chunk["default"]` to access the default export, which may not be what you want. Use `output.exports: "named"` to disable this warning',
url: 'https://rollupjs.org/guide/en/#output-exports'
url: 'https://rollupjs.org/guide/en/#outputexports'
}
]
};
2 changes: 1 addition & 1 deletion test/function/samples/warn-implicit-cjs-auto/_config.js
Expand Up @@ -9,7 +9,7 @@ module.exports = {
id: path.join(__dirname, 'main.js'),
message:
'Entry module "main.js" is implicitly using "default" export mode, which means for CommonJS output that its default export is assigned to "module.exports". For many tools, such CommonJS output will not be interchangeable with the original ES module. If this is intended, explicitly set "output.exports" to either "auto" or "default", otherwise you might want to consider changing the signature of "main.js" to use named exports only.',
url: 'https://rollupjs.org/guide/en/#output-exports'
url: 'https://rollupjs.org/guide/en/#outputexports'
}
]
};
Expand Up @@ -8,7 +8,7 @@ module.exports = {
id: path.resolve(__dirname, 'main.js'),
message:
'Entry module "main.js" is using named and default exports together. Consumers of your bundle will have to use `chunk["default"]` to access the default export, which may not be what you want. Use `output.exports: "named"` to disable this warning',
url: 'https://rollupjs.org/guide/en/#output-exports'
url: 'https://rollupjs.org/guide/en/#outputexports'
}
]
};

0 comments on commit 44b13a2

Please sign in to comment.