mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-16 21:58:19 +00:00
fix(bridge): plugin default detection (#1847)
Co-authored-by: Pooya Parsa <pyapar@gmail.com>
This commit is contained in:
parent
e609f9f542
commit
202617bdd1
@ -35,7 +35,7 @@
|
|||||||
"globby": "^11.0.4",
|
"globby": "^11.0.4",
|
||||||
"hash-sum": "^2.0.0",
|
"hash-sum": "^2.0.0",
|
||||||
"magic-string": "^0.25.7",
|
"magic-string": "^0.25.7",
|
||||||
"mlly": "^0.3.12",
|
"mlly": "^0.3.13",
|
||||||
"node-fetch": "^3.1.0",
|
"node-fetch": "^3.1.0",
|
||||||
"nuxi": "3.0.0",
|
"nuxi": "3.0.0",
|
||||||
"p-debounce": "^4.0.0",
|
"p-debounce": "^4.0.0",
|
||||||
|
@ -26,7 +26,7 @@ export function defaultExportPlugin () {
|
|||||||
if (hasPrefix(id)) {
|
if (hasPrefix(id)) {
|
||||||
let code = await fse.readFile(removePrefix(id), 'utf8')
|
let code = await fse.readFile(removePrefix(id), 'utf8')
|
||||||
const exports = findExports(code)
|
const exports = findExports(code)
|
||||||
if (!exports.find(i => i.type === 'default' || i.name === 'default')) {
|
if (!exports.find(i => i.names.includes('default'))) {
|
||||||
code = addDefaultExport(code)
|
code = addDefaultExport(code)
|
||||||
}
|
}
|
||||||
return { map: null, code }
|
return { map: null, code }
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
"hookable": "^5.0.0",
|
"hookable": "^5.0.0",
|
||||||
"jiti": "^1.12.9",
|
"jiti": "^1.12.9",
|
||||||
"lodash.template": "^4.5.0",
|
"lodash.template": "^4.5.0",
|
||||||
"mlly": "^0.3.12",
|
"mlly": "^0.3.13",
|
||||||
"pathe": "^0.2.0",
|
"pathe": "^0.2.0",
|
||||||
"pkg-types": "^0.3.1",
|
"pkg-types": "^0.3.1",
|
||||||
"rc9": "^1.2.0",
|
"rc9": "^1.2.0",
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
"jiti": "^1.12.9",
|
"jiti": "^1.12.9",
|
||||||
"listhen": "^0.2.5",
|
"listhen": "^0.2.5",
|
||||||
"mime": "^3.0.0",
|
"mime": "^3.0.0",
|
||||||
"mlly": "^0.3.12",
|
"mlly": "^0.3.13",
|
||||||
"node-fetch": "^3.1.0",
|
"node-fetch": "^3.1.0",
|
||||||
"ohmyfetch": "^0.4.6",
|
"ohmyfetch": "^0.4.6",
|
||||||
"ora": "^6.0.1",
|
"ora": "^6.0.1",
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
"flat": "^5.0.2",
|
"flat": "^5.0.2",
|
||||||
"jiti": "^1.12.9",
|
"jiti": "^1.12.9",
|
||||||
"listhen": "^0.2.5",
|
"listhen": "^0.2.5",
|
||||||
"mlly": "^0.3.12",
|
"mlly": "^0.3.13",
|
||||||
"mri": "^1.2.0",
|
"mri": "^1.2.0",
|
||||||
"p-debounce": "^4.0.0",
|
"p-debounce": "^4.0.0",
|
||||||
"pathe": "^0.2.0",
|
"pathe": "^0.2.0",
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
"hash-sum": "^2.0.0",
|
"hash-sum": "^2.0.0",
|
||||||
"hookable": "^5.0.0",
|
"hookable": "^5.0.0",
|
||||||
"ignore": "^5.1.9",
|
"ignore": "^5.1.9",
|
||||||
"mlly": "^0.3.12",
|
"mlly": "^0.3.13",
|
||||||
"murmurhash-es": "^0.1.1",
|
"murmurhash-es": "^0.1.1",
|
||||||
"nuxi": "3.0.0",
|
"nuxi": "3.0.0",
|
||||||
"ohmyfetch": "^0.4.6",
|
"ohmyfetch": "^0.4.6",
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
"externality": "^0.1.5",
|
"externality": "^0.1.5",
|
||||||
"fs-extra": "^10.0.0",
|
"fs-extra": "^10.0.0",
|
||||||
"magic-string": "^0.25.7",
|
"magic-string": "^0.25.7",
|
||||||
"mlly": "^0.3.12",
|
"mlly": "^0.3.13",
|
||||||
"p-debounce": "^4.0.0",
|
"p-debounce": "^4.0.0",
|
||||||
"pathe": "^0.2.0",
|
"pathe": "^0.2.0",
|
||||||
"postcss-import": "^14.0.2",
|
"postcss-import": "^14.0.2",
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"memfs": "^3.3.0",
|
"memfs": "^3.3.0",
|
||||||
"mini-css-extract-plugin": "^2.4.4",
|
"mini-css-extract-plugin": "^2.4.4",
|
||||||
"mlly": "^0.3.12",
|
"mlly": "^0.3.13",
|
||||||
"pathe": "^0.2.0",
|
"pathe": "^0.2.0",
|
||||||
"pify": "^5.0.0",
|
"pify": "^5.0.0",
|
||||||
"postcss": "^8.3.11",
|
"postcss": "^8.3.11",
|
||||||
|
23
yarn.lock
23
yarn.lock
@ -2411,7 +2411,7 @@ __metadata:
|
|||||||
globby: ^11.0.4
|
globby: ^11.0.4
|
||||||
hash-sum: ^2.0.0
|
hash-sum: ^2.0.0
|
||||||
magic-string: ^0.25.7
|
magic-string: ^0.25.7
|
||||||
mlly: ^0.3.12
|
mlly: ^0.3.13
|
||||||
node-fetch: ^3.1.0
|
node-fetch: ^3.1.0
|
||||||
nuxi: 3.0.0
|
nuxi: 3.0.0
|
||||||
nuxt: ^2
|
nuxt: ^2
|
||||||
@ -2615,7 +2615,7 @@ __metadata:
|
|||||||
hookable: ^5.0.0
|
hookable: ^5.0.0
|
||||||
jiti: ^1.12.9
|
jiti: ^1.12.9
|
||||||
lodash.template: ^4.5.0
|
lodash.template: ^4.5.0
|
||||||
mlly: ^0.3.12
|
mlly: ^0.3.13
|
||||||
pathe: ^0.2.0
|
pathe: ^0.2.0
|
||||||
pkg-types: ^0.3.1
|
pkg-types: ^0.3.1
|
||||||
rc9: ^1.2.0
|
rc9: ^1.2.0
|
||||||
@ -2687,7 +2687,7 @@ __metadata:
|
|||||||
jiti: ^1.12.9
|
jiti: ^1.12.9
|
||||||
listhen: ^0.2.5
|
listhen: ^0.2.5
|
||||||
mime: ^3.0.0
|
mime: ^3.0.0
|
||||||
mlly: ^0.3.12
|
mlly: ^0.3.13
|
||||||
node-fetch: ^3.1.0
|
node-fetch: ^3.1.0
|
||||||
ohmyfetch: ^0.4.6
|
ohmyfetch: ^0.4.6
|
||||||
ora: ^6.0.1
|
ora: ^6.0.1
|
||||||
@ -2856,7 +2856,7 @@ __metadata:
|
|||||||
externality: ^0.1.5
|
externality: ^0.1.5
|
||||||
fs-extra: ^10.0.0
|
fs-extra: ^10.0.0
|
||||||
magic-string: ^0.25.7
|
magic-string: ^0.25.7
|
||||||
mlly: ^0.3.12
|
mlly: ^0.3.13
|
||||||
p-debounce: ^4.0.0
|
p-debounce: ^4.0.0
|
||||||
pathe: ^0.2.0
|
pathe: ^0.2.0
|
||||||
postcss-import: ^14.0.2
|
postcss-import: ^14.0.2
|
||||||
@ -2937,7 +2937,7 @@ __metadata:
|
|||||||
lodash-es: ^4.17.21
|
lodash-es: ^4.17.21
|
||||||
memfs: ^3.3.0
|
memfs: ^3.3.0
|
||||||
mini-css-extract-plugin: ^2.4.4
|
mini-css-extract-plugin: ^2.4.4
|
||||||
mlly: ^0.3.12
|
mlly: ^0.3.13
|
||||||
pathe: ^0.2.0
|
pathe: ^0.2.0
|
||||||
pify: ^5.0.0
|
pify: ^5.0.0
|
||||||
postcss: ^8.3.11
|
postcss: ^8.3.11
|
||||||
@ -13769,13 +13769,20 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"mlly@npm:^0.3.0, mlly@npm:^0.3.10, mlly@npm:^0.3.12, mlly@npm:^0.3.6":
|
"mlly@npm:^0.3.0, mlly@npm:^0.3.10, mlly@npm:^0.3.6":
|
||||||
version: 0.3.12
|
version: 0.3.12
|
||||||
resolution: "mlly@npm:0.3.12"
|
resolution: "mlly@npm:0.3.12"
|
||||||
checksum: f9f93622023f4a9adfd27c465ff40146725cbb17176eb3610f4cec73f31edca41dc571030d185406d30044aaa0565a75782ac74a69be3cc58c10fc50505bb74d
|
checksum: f9f93622023f4a9adfd27c465ff40146725cbb17176eb3610f4cec73f31edca41dc571030d185406d30044aaa0565a75782ac74a69be3cc58c10fc50505bb74d
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"mlly@npm:^0.3.13":
|
||||||
|
version: 0.3.13
|
||||||
|
resolution: "mlly@npm:0.3.13"
|
||||||
|
checksum: cd17c0efd85a65ac50e2c7fb30357341b772c6167fb3efc7f74a021443a126fdf1bc3952ce98bb3aed3018ba77baddf6a813ece2f29be2310a545f5be2657c99
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"mocha@npm:^9.1.3":
|
"mocha@npm:^9.1.3":
|
||||||
version: 9.1.3
|
version: 9.1.3
|
||||||
resolution: "mocha@npm:9.1.3"
|
resolution: "mocha@npm:9.1.3"
|
||||||
@ -14550,7 +14557,7 @@ __metadata:
|
|||||||
fsevents: ~2.3.2
|
fsevents: ~2.3.2
|
||||||
jiti: ^1.12.9
|
jiti: ^1.12.9
|
||||||
listhen: ^0.2.5
|
listhen: ^0.2.5
|
||||||
mlly: ^0.3.12
|
mlly: ^0.3.13
|
||||||
mri: ^1.2.0
|
mri: ^1.2.0
|
||||||
p-debounce: ^4.0.0
|
p-debounce: ^4.0.0
|
||||||
pathe: ^0.2.0
|
pathe: ^0.2.0
|
||||||
@ -14627,7 +14634,7 @@ __metadata:
|
|||||||
hash-sum: ^2.0.0
|
hash-sum: ^2.0.0
|
||||||
hookable: ^5.0.0
|
hookable: ^5.0.0
|
||||||
ignore: ^5.1.9
|
ignore: ^5.1.9
|
||||||
mlly: ^0.3.12
|
mlly: ^0.3.13
|
||||||
murmurhash-es: ^0.1.1
|
murmurhash-es: ^0.1.1
|
||||||
nuxi: 3.0.0
|
nuxi: 3.0.0
|
||||||
ohmyfetch: ^0.4.6
|
ohmyfetch: ^0.4.6
|
||||||
|
Loading…
Reference in New Issue
Block a user