Skip to content

Commit 928f56f

Browse files
IWANABETHATGUYsapphi-red
authored andcommitted
fix: 🐛 lint (#58)
1 parent fd546a4 commit 928f56f

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

packages/vite/src/node/build.ts

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,10 +1040,10 @@ export function resolveBuildOutputs(
10401040
}
10411041

10421042
const warningIgnoreList = [`CIRCULAR_DEPENDENCY`, `THIS_IS_UNDEFINED`]
1043-
const dynamicImportWarningIgnoreList = [
1044-
`Unsupported expression`,
1045-
`statically analyzed`,
1046-
]
1043+
// const dynamicImportWarningIgnoreList = [
1044+
// `Unsupported expression`,
1045+
// `statically analyzed`,
1046+
// ]
10471047

10481048
function clearLine() {
10491049
const tty = process.stdout.isTTY && !process.env.CI
@@ -1068,41 +1068,41 @@ export function onRollupWarning(
10681068
}
10691069

10701070
if (typeof warning === 'object') {
1071-
if (warning.code === 'UNRESOLVED_IMPORT') {
1072-
const id = warning.id
1073-
const exporter = warning.exporter
1074-
// throw unless it's commonjs external...
1075-
if (!id || !id.endsWith('?commonjs-external')) {
1076-
throw new Error(
1077-
`[vite]: Rollup failed to resolve import "${exporter}" from "${id}".\n` +
1078-
`This is most likely unintended because it can break your application at runtime.\n` +
1079-
`If you do want to externalize this module explicitly add it to\n` +
1080-
`\`build.rollupOptions.external\``,
1081-
)
1082-
}
1083-
}
1071+
// if (warning.code === 'UNRESOLVED_IMPORT') {
1072+
// const id = warning.id
1073+
// const exporter = warning.exporter
1074+
// // throw unless it's commonjs external...
1075+
// if (!id || !id.endsWith('?commonjs-external')) {
1076+
// throw new Error(
1077+
// `[vite]: Rollup failed to resolve import "${exporter}" from "${id}".\n` +
1078+
// `This is most likely unintended because it can break your application at runtime.\n` +
1079+
// `If you do want to externalize this module explicitly add it to\n` +
1080+
// `\`build.rollupOptions.external\``,
1081+
// )
1082+
// }
1083+
// }
10841084

1085-
if (
1086-
warning.plugin === 'rollup-plugin-dynamic-import-variables' &&
1087-
dynamicImportWarningIgnoreList.some((msg) =>
1088-
warning.message.includes(msg),
1089-
)
1090-
) {
1091-
return
1092-
}
1085+
// if (
1086+
// warning.plugin === 'rollup-plugin-dynamic-import-variables' &&
1087+
// dynamicImportWarningIgnoreList.some((msg) =>
1088+
// warning.message.includes(msg),
1089+
// )
1090+
// ) {
1091+
// return
1092+
// }
10931093

10941094
if (warningIgnoreList.includes(warning.code!)) {
10951095
return
10961096
}
10971097

1098-
if (warning.code === 'PLUGIN_WARNING') {
1099-
environment.logger.warn(
1100-
`${colors.bold(
1101-
colors.yellow(`[plugin:${warning.plugin}]`),
1102-
)} ${colors.yellow(warning.message)}`,
1103-
)
1104-
return
1105-
}
1098+
// if (warning.code === 'PLUGIN_WARNING') {
1099+
// environment.logger.warn(
1100+
// `${colors.bold(
1101+
// colors.yellow(`[plugin:${warning.plugin}]`),
1102+
// )} ${colors.yellow(warning.message)}`,
1103+
// )
1104+
// return
1105+
// }
11061106
}
11071107

11081108
warn(warnLog)

0 commit comments

Comments
 (0)