UNPKG

@storm-stack/core

Version:

A build toolkit and runtime used by Storm Software in TypeScript applications

1 lines 2.25 kB
{"version":3,"sources":["../../../src/unplugin/nuxt.ts"],"names":["nuxt","defineNuxtModule","meta","name","configKey","defaults","setup","options","_nuxt","addVitePlugin","StormStack","vite","addWebpackPlugin","webpack"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,IAAMA,OAAOC,oBAAAA,CAAqC;EAChDC,IAAAA,EAAM;IACJC,IAAAA,EAAM,aAAA;IACNC,SAAAA,EAAW;AACb,GAAA;AACAC,EAAAA,QAAAA,EAAU,EAAC;AACXC,EAAAA,KAAAA,CAAMC,SAASC,KAAAA,EAAK;AAClBC,IAAAA,iBAAAA,CAAc,MAAMC,4BAAAA,CAAWC,IAAAA,CAAKJ,OAAAA,CAAAA,CAAAA;AACpCK,IAAAA,oBAAAA,CAAiB,MAAMF,4BAAAA,CAAWG,OAAAA,CAAQN,OAAAA,CAAAA,CAAAA;AAC5C,EAAA;AACF,CAAA;AACA,IAAA,YAAA,GAAeP","file":"nuxt.cjs","sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Storm Stack\n\n This code was released as part of the Storm Stack project. Storm Stack\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/storm-stack.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/storm-stack\n Documentation: https://docs.stormsoftware.com/projects/storm-stack\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { addVitePlugin, addWebpackPlugin, defineNuxtModule } from \"@nuxt/kit\";\nimport \"@nuxt/schema\";\nimport type { ResolvedUserConfig } from \"../types/config\";\nimport { StormStack } from \"./index\";\n\n/**\n * Nuxt plugin\n *\n * @example\n * ```js\n * // nuxt.config.js\n * import StormStack from 'storm-stack/nuxt'\n *\n * default export {\n * plugins: [StormStack()],\n * }\n * ```\n */\nconst nuxt = defineNuxtModule<ResolvedUserConfig>({\n meta: {\n name: \"storm-stack\",\n configKey: \"storm\"\n },\n defaults: {},\n setup(options, _nuxt) {\n addVitePlugin(() => StormStack.vite(options));\n addWebpackPlugin(() => StormStack.webpack(options));\n }\n});\nexport default nuxt;\nexport { nuxt as \"module.exports\" };\n"]}