Skip to content

[Bug]: disabled not working #128

Description

@hckhanh

version

     "tailwindcss-patch": "5.0.2",
    "ts-node": "^10.0.0",
    "typescript": "5.7.2",
    "unplugin-tailwindcss-mangle": "4.0.2",

Steps to reproduce

import react from '@vitejs/plugin-react'
import browserslistToEsbuild from 'browserslist-to-esbuild'
import path from 'node:path'
import utwm from 'unplugin-tailwindcss-mangle/vite'
import { defineConfig } from 'vite'

const supportedBrowsers = browserslistToEsbuild()

console.log(process.env.NODE_ENV !== 'production')

// https://vitejs.dev/config
export default defineConfig({
  plugins: [react(), utwm({ disabled: true })],
  esbuild: {
    legalComments: 'none',
    target: supportedBrowsers,
  },
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src'),
    },
  },
})

What is expected?

It should disable this plugin

What is actually happening?

It does not work as intended

System Info

  System:
    OS: macOS 15.2
    CPU: (10) arm64 Apple M2 Pro
    Memory: 109.58 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 23.4.0 - /opt/homebrew/bin/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 10.9.2 - /opt/homebrew/bin/npm
    pnpm: 9.15.1 - ~/Library/pnpm/pnpm
    bun: 1.1.40 - /opt/homebrew/bin/bun
  npmPackages:
    @eslint/js: 9.17.0 => 9.17.0 
    @typescript-eslint/eslint-plugin: 8.18.2 => 8.18.2 
    @typescript-eslint/parser: 8.18.2 => 8.18.2 
    eslint: 9.17.0 => 9.17.0 
    eslint-import-resolver-typescript: 3.7.0 => 3.7.0 
    eslint-plugin-import: ^2.25.0 => 2.31.0 
    eslint-plugin-import-x: 4.6.1 => 4.6.1 
    eslint-plugin-jsonc: 2.18.2 => 2.18.2 
    eslint-plugin-lingui: 0.9.0 => 0.9.0 
    eslint-plugin-perfectionist: 4.4.0 => 4.4.0 
    eslint-plugin-react: 7.37.3 => 7.37.3 
    eslint-plugin-react-hooks: 5.1.0 => 5.1.0 
    eslint-plugin-turbo: 2.3.3 => 2.3.3 
    globals: 15.14.0 => 15.14.0 
    prettier: 3.4.2 => 3.4.2 
    prettier-plugin-tailwindcss: 0.6.9 => 0.6.9 
    syncpack: 13.0.0 => 13.0.0 
    typescript-eslint: 8.18.2 => 8.18.2 

Any additional comments?

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions