mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 21:55:11 +00:00
Compare commits
8 Commits
b09764cdd4
...
6918ea0d72
Author | SHA1 | Date | |
---|---|---|---|
|
6918ea0d72 | ||
|
9bf8465806 | ||
|
f94d3f2bc6 | ||
|
9c8cd4b74b | ||
|
38bfe2a6bc | ||
|
06add6e7fb | ||
|
6aa5d12652 | ||
|
05403910ac |
@ -21,8 +21,8 @@ Or follow the steps below to set up a new Nuxt project on your computer.
|
|||||||
<!-- markdownlint-disable-next-line MD001 -->
|
<!-- markdownlint-disable-next-line MD001 -->
|
||||||
#### Prerequisites
|
#### Prerequisites
|
||||||
|
|
||||||
- **Node.js** - [`v18.0.0`](https://nodejs.org/en) or newer
|
- **Node.js** - [`18.x`](https://nodejs.org/en) or newer (but we recommend the [active LTS release](https://github.com/nodejs/release#release-schedule))
|
||||||
- **Text editor** - We recommend [Visual Studio Code](https://code.visualstudio.com/) with the [official Vue extension](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (previously known as Volar)
|
- **Text editor** - There is no IDE requirement, but we recommend [Visual Studio Code](https://code.visualstudio.com/) with the [official Vue extension](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (previously known as Volar) or [WebStorm](https://www.jetbrains.com/webstorm/), which, along with [other JetBrains IDEs](https://www.jetbrains.com/ides/), offers great Nuxt support right out-of-the-box.
|
||||||
- **Terminal** - In order to run Nuxt commands
|
- **Terminal** - In order to run Nuxt commands
|
||||||
|
|
||||||
::note
|
::note
|
||||||
|
@ -189,7 +189,6 @@ export default createConfigForNuxt({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
// Sort rule keys in eslint config
|
// Sort rule keys in eslint config
|
||||||
// @ts-expect-error incorrect types 🤔
|
|
||||||
{
|
{
|
||||||
files: ['**/eslint.config.mjs'],
|
files: ['**/eslint.config.mjs'],
|
||||||
name: 'local/sort-eslint-config',
|
name: 'local/sort-eslint-config',
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
"@nuxt/ui-templates": "workspace:*",
|
"@nuxt/ui-templates": "workspace:*",
|
||||||
"@nuxt/vite-builder": "workspace:*",
|
"@nuxt/vite-builder": "workspace:*",
|
||||||
"@nuxt/webpack-builder": "workspace:*",
|
"@nuxt/webpack-builder": "workspace:*",
|
||||||
"@types/node": "22.9.0",
|
"@types/node": "22.9.1",
|
||||||
"@unhead/dom": "1.11.11",
|
"@unhead/dom": "1.11.11",
|
||||||
"@unhead/shared": "1.11.11",
|
"@unhead/shared": "1.11.11",
|
||||||
"@unhead/vue": "1.11.11",
|
"@unhead/vue": "1.11.11",
|
||||||
@ -75,7 +75,7 @@
|
|||||||
"@nuxt/webpack-builder": "workspace:*",
|
"@nuxt/webpack-builder": "workspace:*",
|
||||||
"@testing-library/vue": "8.1.0",
|
"@testing-library/vue": "8.1.0",
|
||||||
"@types/eslint__js": "8.42.3",
|
"@types/eslint__js": "8.42.3",
|
||||||
"@types/node": "22.9.0",
|
"@types/node": "22.9.1",
|
||||||
"@types/semver": "7.5.8",
|
"@types/semver": "7.5.8",
|
||||||
"@unhead/schema": "1.11.11",
|
"@unhead/schema": "1.11.11",
|
||||||
"@unhead/vue": "1.11.11",
|
"@unhead/vue": "1.11.11",
|
||||||
@ -91,7 +91,7 @@
|
|||||||
"devalue": "5.1.1",
|
"devalue": "5.1.1",
|
||||||
"eslint": "9.15.0",
|
"eslint": "9.15.0",
|
||||||
"eslint-plugin-no-only-tests": "3.3.0",
|
"eslint-plugin-no-only-tests": "3.3.0",
|
||||||
"eslint-plugin-perfectionist": "3.9.1",
|
"eslint-plugin-perfectionist": "4.0.2",
|
||||||
"eslint-typegen": "0.3.2",
|
"eslint-typegen": "0.3.2",
|
||||||
"h3": "npm:h3-nightly@2.0.0-1718872656.6765a6e",
|
"h3": "npm:h3-nightly@2.0.0-1718872656.6765a6e",
|
||||||
"happy-dom": "15.11.6",
|
"happy-dom": "15.11.6",
|
||||||
|
@ -122,7 +122,25 @@ export default defineNuxtModule<Partial<ImportsOptions>>({
|
|||||||
const scannedImports = await scanDirExports(composablesDirs, {
|
const scannedImports = await scanDirExports(composablesDirs, {
|
||||||
fileFilter: file => !isIgnored(file),
|
fileFilter: file => !isIgnored(file),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const presetMap = new Map<string, string>()
|
||||||
|
|
||||||
|
for (const preset of presets) {
|
||||||
|
preset.imports = preset.imports ?? []
|
||||||
|
for (const i of preset.imports) {
|
||||||
|
presetMap.set(i, preset.from)
|
||||||
|
}
|
||||||
|
presetMap.set(preset.as, preset.from)
|
||||||
|
}
|
||||||
|
|
||||||
for (const i of scannedImports) {
|
for (const i of scannedImports) {
|
||||||
|
const name = i.as ?? i.name
|
||||||
|
const preset = presetMap.get(name)
|
||||||
|
|
||||||
|
if (preset) {
|
||||||
|
console.warn(`[imports] "${name}" is already defined and auto imported from "${preset ?? 'unknown preset'}" within nuxt itself. Please consider renaming "${name}" at ${i.from}.`)
|
||||||
|
}
|
||||||
|
|
||||||
i.priority = i.priority || priorities.find(([dir]) => i.from.startsWith(dir))?.[1]
|
i.priority = i.priority || priorities.find(([dir]) => i.from.startsWith(dir))?.[1]
|
||||||
}
|
}
|
||||||
imports.push(...scannedImports)
|
imports.push(...scannedImports)
|
||||||
|
429
pnpm-lock.yaml
429
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user