8000 feat: support farm by ErKeLost · Pull Request #169 · unplugin/unplugin-vue · GitHub
[go: up one dir, main page]

Skip to content

feat: support farm #169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
Apr 16, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: remove unless code
  • Loading branch information
ErKeLost committed Apr 15, 2025
commit e24156023e728657f1419e9b6284890d4ea7b4d8
1 change: 0 additions & 1 deletion examples/farm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
},
"devDependencies": {
"@farmfe/cli": "2.0.0-nightly-20250411100807",
"@vitejs/plugin-vue": "^5.0.4",
"core-js": "^3.30.1",
"unplugin-vue": "workspace:*"
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@
"vue": "^3.2.25"
},
"dependencies": {
"@farmfe/core": "2.0.0-nightly-20250411141103",
"@vue/reactivity": "^3.5.13",
"debug": "^4.4.0",
"unplugin": "^2.3.0",
"vite": "^6.2.5"
},
"devDependencies": {
"@babel/types": "^7.27.0",
"@farmfe/core": "2.0.0-nightly-20250411141103",
"@jridgewell/gen-mapping": "^0.3.8",
"@jridgewell/trace-mapping": "^0.3.25",
"@sxzz/eslint-config": "^6.1.1",
Expand Down
20 changes: 11 additions & 9 deletions src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,14 @@ export interface Options {
* - **default:** `'filepath'` in development, `'filepath-source'` in production
*/
componentIdGenerator?:
| 'filepath'
| 'filepath-source'
| ((
filepath: string,
source: string,
isProduction: boolean | undefined,
getHash: (text: string) => string,
) => string)
| 'filepath'
| 'filepath-source'
| ((
filepath: string,
source: string,
isProduction: boolean | undefined,
getHash: (text: string) => string,
) => string)
}
}

Expand Down Expand Up @@ -244,6 +244,7 @@ export const plugin: UnpluginInstance<Options | undefined, false> =

return {
name: 'unplugin-vue',

vite: {
api,
handleHotUpdate(ctx) {
Expand Down Expand Up @@ -479,6 +480,7 @@ export const plugin: UnpluginInstance<Options | undefined, false> =

loadInclude(id) {
if (id === EXPORT_HELPER_ID) return true

const { query } = parseVueRequest(id)
return query.vue
},
Expand Down Expand Up @@ -545,7 +547,7 @@ export const plugin: UnpluginInstance<Options | undefined, false> =
// sub block request
const descriptor: ExtendedSFCDescriptor = query.src
? getSrcDescriptor(filename, query) ||
getTempSrcDescriptor(filename, query)
getTempSrcDescriptor(filename, query)
: getDescriptor(filename, options.value)!

if (query.src) {
Expand Down
0