feat(config): add plugins in config type
This commit is contained in:
parent
a3b42c5d7f
commit
d46bf2255b
2 changed files with 9 additions and 7 deletions
|
@ -1,19 +1,21 @@
|
|||
import type { NitroConfig } from 'nitropack'
|
||||
|
||||
/**
|
||||
* TODO: fix types
|
||||
* - plugins missing
|
||||
*/
|
||||
export type McFlyConfig = {
|
||||
components: 'js' | 'lit'
|
||||
nitro?: NitroConfig
|
||||
plugins?: McFlyPlugin[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the configuration for the McFly project
|
||||
* @param {McFlyConfig} config
|
||||
* @returns {function(): McFlyConfig}
|
||||
* @returns {function(): McFlyConfig}e
|
||||
*/
|
||||
export function defineMcFlyConfig(config: McFlyConfig) {
|
||||
return () => config
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO: finalize Plugin type
|
||||
*/
|
||||
export type McFlyPlugin = {}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// @ts-check
|
||||
import { defineMcFlyConfig } from '@mcflyjs/config'
|
||||
import testPlugin from './test-plugin.mjs'
|
||||
// import testPlugin from './test-plugin.mjs'
|
||||
|
||||
export default defineMcFlyConfig({
|
||||
components: 'js',
|
||||
plugins: [testPlugin()],
|
||||
// plugins: [testPlugin()],
|
||||
nitro: {
|
||||
preset: 'netlify',
|
||||
devServer: {
|
||||
|
|
Loading…
Reference in a new issue