flowbite-react
Version:
Official React components built for Flowbite and Tailwind CSS
35 lines (31 loc) • 916 B
JavaScript
var build = require('../cli/commands/build.cjs');
var dev = require('../cli/commands/dev.cjs');
function withFlowbiteReact(nextConfig = {}) {
if (process.env.NODE_ENV === "development") {
dev.dev();
}
if (process.env.NODE_ENV === "production") {
build.build();
}
if (typeof nextConfig === "function") {
return async (phase, options) => {
const originalConfig = await nextConfig(phase, options);
return patchConfig(originalConfig);
};
}
return patchConfig(nextConfig);
}
function patchConfig(config) {
const experimental = config.experimental || {};
const optimizePackageImports = experimental.optimizePackageImports || [];
return {
...config,
experimental: {
...experimental,
optimizePackageImports: [...optimizePackageImports, "flowbite-react"]
}
};
}
module.exports = withFlowbiteReact;
//# sourceMappingURL=nextjs.cjs.map
;