UNPKG

flowbite-react

Version:

Official React components built for Flowbite and Tailwind CSS

1 lines 1.43 kB
{"version":3,"file":"rspack.cjs","sources":["webpack://flowbite-react/./src/plugin/rspack.ts"],"sourcesContent":["import type { RspackPluginInstance } from \"@rspack/core\";\nimport { build } from \"../cli/commands/build\";\nimport { dev } from \"../cli/commands/dev\";\nimport { pluginName } from \"./index\";\n\nexport default (): RspackPluginInstance => ({\n name: pluginName,\n apply(compiler) {\n let devServerStarted = false;\n\n compiler.hooks.beforeCompile.tapPromise(pluginName, async () => {\n const isDev = compiler.options.mode === \"development\";\n const isBuild = compiler.options.mode === \"production\";\n\n if (isBuild) {\n await build();\n } else if (isDev && !devServerStarted) {\n devServerStarted = true;\n await build();\n await dev();\n }\n });\n },\n});\n"],"names":["pluginName","compiler","devServerStarted","isDev","isBuild","build","dev"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,4BAAgB,IAA4B;QAC1C,MAAMA,mCAAAA,UAAUA;QAChB,OAAMC,QAAQ;YACZ,IAAIC,mBAAmB;YAEvBD,SAAS,KAAK,CAAC,aAAa,CAAC,UAAU,CAACD,mCAAAA,UAAUA,EAAE;gBAClD,MAAMG,QAAQF,AAA0B,kBAA1BA,SAAS,OAAO,CAAC,IAAI;gBACnC,MAAMG,UAAUH,AAA0B,iBAA1BA,SAAS,OAAO,CAAC,IAAI;gBAErC,IAAIG,SACF,MAAMC,AAAAA,IAAAA,sBAAAA,KAAAA,AAAAA;qBACD,IAAIF,SAAS,CAACD,kBAAkB;oBACrCA,mBAAmB;oBACnB,MAAMG,AAAAA,IAAAA,sBAAAA,KAAAA,AAAAA;oBACN,MAAMC,AAAAA,IAAAA,oBAAAA,GAAAA,AAAAA;gBACR;YACF;QACF;IACF"}