diff --git a/sources/@roots/bud-solid/package.json b/sources/@roots/bud-solid/package.json index 8f9fb0b525..2421c81936 100644 --- a/sources/@roots/bud-solid/package.json +++ b/sources/@roots/bud-solid/package.json @@ -51,22 +51,12 @@ ], "type": "module", "exports": { - ".": { - "import": "./lib/index.js", - "default": "./lib/index.js" - }, - "./types": { - "import": "./lib/types.js", - "default": "./lib/types.js" - } + ".": "./lib/index.js" }, "typesVersions": { "*": { ".": [ "./lib/index.d.ts" - ], - "types": [ - "./lib/types.d.ts" ] } }, diff --git a/sources/@roots/bud-solid/src/extension.ts b/sources/@roots/bud-solid/src/extension.ts index 97d4972333..5513b63fe9 100644 --- a/sources/@roots/bud-solid/src/extension.ts +++ b/sources/@roots/bud-solid/src/extension.ts @@ -18,9 +18,12 @@ export default class BudSolid extends Extension { */ @bind public override async boot(bud: Bud) { - bud.babel.setPreset( + const babelPresetSolid = await this.resolve( `babel-preset-solid`, - await this.resolve(`babel-preset-solid`, import.meta.url), + import.meta.url, ) + if (!babelPresetSolid) return + + bud.babel.setPreset(`babel-preset-solid`, babelPresetSolid) } } diff --git a/sources/@roots/bud-solid/src/index.ts b/sources/@roots/bud-solid/src/index.ts index e3cbf4774d..1b244f4288 100644 --- a/sources/@roots/bud-solid/src/index.ts +++ b/sources/@roots/bud-solid/src/index.ts @@ -7,6 +7,13 @@ * @see https://bud.js.org * @see https://github.com/roots/bud */ -import './types.js' -export {default} from './extension.js' +import BudSolid from './extension.js' + +declare module '@roots/bud-framework' { + interface Modules { + '@roots/bud-solid': BudSolid + } +} + +export {BudSolid as default} diff --git a/sources/@roots/bud-solid/src/types.ts b/sources/@roots/bud-solid/src/types.ts deleted file mode 100644 index d54c1121b0..0000000000 --- a/sources/@roots/bud-solid/src/types.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare module '@roots/bud-framework' { - interface Modules { - '@roots/bud-solid': {} - } -} diff --git a/sources/@roots/bud-solid/test/extension.test.ts b/sources/@roots/bud-solid/test/extension.test.ts index 981ea3ef3b..c623734e3d 100644 --- a/sources/@roots/bud-solid/test/extension.test.ts +++ b/sources/@roots/bud-solid/test/extension.test.ts @@ -1,7 +1,6 @@ +import Extension from '@roots/bud-solid' import {describe, expect, it} from 'vitest' -import Extension from '../src/index.js' - describe(`@roots/bud-solid`, () => { it(`should be constructable`, () => { expect(Extension).toBeInstanceOf(Function)