chore: 添加初始项目文件和依赖项
初始化项目,添加 favicon.ico、screenshot.png 等静态资源文件,以及 Vue、TailwindCSS 等依赖项。配置了 Vite 和 PostCSS,并生成了基本的项目结构。
This commit is contained in:
34
node_modules/vite/index.cjs
generated
vendored
Normal file
34
node_modules/vite/index.cjs
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/* eslint-disable no-restricted-globals */
|
||||
|
||||
// type utils
|
||||
module.exports.defineConfig = (config) => config
|
||||
|
||||
// proxy cjs utils (sync functions)
|
||||
Object.assign(module.exports, require('./dist/node-cjs/publicUtils.cjs'))
|
||||
|
||||
// async functions, can be redirect from ESM build
|
||||
const asyncFunctions = [
|
||||
'build',
|
||||
'createServer',
|
||||
'preview',
|
||||
'transformWithEsbuild',
|
||||
'resolveConfig',
|
||||
'optimizeDeps',
|
||||
'formatPostcssSourceMap',
|
||||
'loadConfigFromFile',
|
||||
'preprocessCSS',
|
||||
]
|
||||
asyncFunctions.forEach((name) => {
|
||||
module.exports[name] = (...args) =>
|
||||
import('./dist/node/index.js').then((i) => i[name](...args))
|
||||
})
|
||||
|
||||
// some sync functions are marked not supported due to their complexity and uncommon usage
|
||||
const unsupportedCJS = ['resolvePackageEntry', 'resolvePackageData']
|
||||
unsupportedCJS.forEach((name) => {
|
||||
module.exports[name] = () => {
|
||||
throw new Error(
|
||||
`"${name}" is not supported in CJS build of Vite 4.\nPlease use ESM or dynamic imports \`const { ${name} } = await import('vite')\`.`,
|
||||
)
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user