Skip to content

Commit 326bcae

Browse files
IWANABETHATGUYsapphi-red
authored andcommitted
fix: 🐛 lint (#58)
1 parent 6c2a5d4 commit 326bcae

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
@@ -1037,10 +1037,10 @@ export function resolveBuildOutputs(
10371037
}
10381038

10391039
const warningIgnoreList = [`CIRCULAR_DEPENDENCY`, `THIS_IS_UNDEFINED`]
1040-
const dynamicImportWarningIgnoreList = [
1041-
`Unsupported expression`,
1042-
`statically analyzed`,
1043-
]
1040+
// const dynamicImportWarningIgnoreList = [
1041+
// `Unsupported expression`,
1042+
// `statically analyzed`,
1043+
// ]
10441044

10451045
function clearLine() {
10461046
const tty = process.stdout.isTTY && !process.env.CI
@@ -1065,41 +1065,41 @@ export function onRollupWarning(
10651065
}
10661066

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

1082-
if (
1083-
warning.plugin === 'rollup-plugin-dynamic-import-variables' &&
1084-
dynamicImportWarningIgnoreList.some((msg) =>
1085-
warning.message.includes(msg),
1086-
)
1087-
) {
1088-
return
1089-
}
1082+
// if (
1083+
// warning.plugin === 'rollup-plugin-dynamic-import-variables' &&
1084+
// dynamicImportWarningIgnoreList.some((msg) =>
1085+
// warning.message.includes(msg),
1086+
// )
1087+
// ) {
1088+
// return
1089+
// }
10901090

10911091
if (warningIgnoreList.includes(warning.code!)) {
10921092
return
10931093
}
10941094

1095-
if (warning.code === 'PLUGIN_WARNING') {
1096-
environment.logger.warn(
1097-
`${colors.bold(
1098-
colors.yellow(`[plugin:${warning.plugin}]`),
1099-
)} ${colors.yellow(warning.message)}`,
1100-
)
1101-
return
1102-
}
1095+
// if (warning.code === 'PLUGIN_WARNING') {
1096+
// environment.logger.warn(
1097+
// `${colors.bold(
1098+
// colors.yellow(`[plugin:${warning.plugin}]`),
1099+
// )} ${colors.yellow(warning.message)}`,
1100+
// )
1101+
// return
1102+
// }
11031103
}
11041104

11051105
warn(warnLog)

0 commit comments

Comments
 (0)