tailwindcss-mangle icon indicating copy to clipboard operation
tailwindcss-mangle copied to clipboard

Sourcemap is likely to be incorrect

Open mohdlatif opened this issue 2 years ago • 3 comments

I am using Nuxt 3.8

The plugin works fine, however during building I am getting this warning

(unplugin-tailwindcss-mangle plugin) Sourcemap is likely to be incorrect: a plugin (unplugin-tailwindcss-mangle) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help

image

Also, how to change tw- prefix ?

mohdlatif avatar Nov 28 '23 09:11 mohdlatif

Hi mohdlatif,

  • You can pass option classGenerator.classPrefix to change default tw- prefix.

  • The wrong Soucemap may be a bug. I'll go into this issue when I have time.

sonofmagic avatar Nov 29 '23 05:11 sonofmagic

@sonofmagic how to pass classGenerator.classPrefix ?

I tried below config doesn't work:

import { defineConfig } from 'tailwindcss-patch'

export default defineConfig({
  patch: {
    'classGenerator': {
      'classPrefix': 'xxx-'
    }
  },

})

dyaskur avatar Oct 10 '24 22:10 dyaskur

Ah, it seems the correct config is:

utwm({
      classGenerator: {
        'classPrefix': 'x-'
      }
    })

dyaskur avatar Oct 10 '24 22:10 dyaskur