Function cssPlugin

  • Parameters

    Returns Plugin

    Source

    const cssPlugin: (options?: CSSPluginOptions) => Plugin = (options = {}) => ({
    name: "esbuild-plugin-react18-css-" + uuid(),
    setup(build): void {
    const write = build.initialOptions.write;
    build.initialOptions.write = false;
    if (!options.generateScopedName) resolveScopedName(options);
    handleModules(build, options);
    handleScss(build);
    applyAutoPrefixer(build, options, write);
    },
    });