Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: disabled not working #128

Open
hckhanh opened this issue Dec 27, 2024 · 0 comments
Open

[Bug]: disabled not working #128

hckhanh opened this issue Dec 27, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@hckhanh
Copy link

hckhanh commented Dec 27, 2024

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

@hckhanh hckhanh added the bug Something isn't working label Dec 27, 2024
@hckhanh hckhanh changed the title [Bug]: disabled not working [Bug]: disabled not working Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants