Changeset 0c6b92a for imaps-frontend/node_modules/vite/index.cjs
- Timestamp:
- 12/12/24 17:06:06 (5 weeks ago)
- Branches:
- main
- Parents:
- d565449
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/vite/index.cjs
rd565449 r0c6b92a 1 /* eslint-disable no-restricted-globals */2 3 1 warnCjsUsage() 4 2 … … 7 5 8 6 // proxy cjs utils (sync functions) 9 // eslint-disable-next-line n/no-missing-require -- will be generated by build10 7 Object.assign(module.exports, require('./dist/node-cjs/publicUtils.cjs')) 11 8 … … 29 26 function warnCjsUsage() { 30 27 if (process.env.VITE_CJS_IGNORE_WARNING) return 28 const logLevelIndex = process.argv.findIndex((arg) => 29 /^(?:-l|--logLevel)/.test(arg), 30 ) 31 if (logLevelIndex > 0) { 32 const logLevelValue = process.argv[logLevelIndex + 1] 33 if (logLevelValue === 'silent' || logLevelValue === 'error') { 34 return 35 } 36 if (/silent|error/.test(process.argv[logLevelIndex])) { 37 return 38 } 39 } 31 40 const yellow = (str) => `\u001b[33m${str}\u001b[39m` 32 const log = process.env.VITE_CJS_TRACE ? console.trace : console.warn 33 log( 41 console.warn( 34 42 yellow( 35 `The CJS build of Vite's Node API is deprecated. See https://vite js.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.`,43 `The CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.`, 36 44 ), 37 45 ) 46 if (process.env.VITE_CJS_TRACE) { 47 const e = {} 48 const stackTraceLimit = Error.stackTraceLimit 49 Error.stackTraceLimit = 100 50 Error.captureStackTrace(e) 51 Error.stackTraceLimit = stackTraceLimit 52 console.log( 53 e.stack 54 .split('\n') 55 .slice(1) 56 .filter((line) => !line.includes('(node:')) 57 .join('\n'), 58 ) 59 } 38 60 }
Note:
See TracChangeset
for help on using the changeset viewer.