tailwindcss icon indicating copy to clipboard operation
tailwindcss copied to clipboard

使用 m-2.5 类,打包后成为 m-2\.5,导致找不到

Open xbf321 opened this issue 2 years ago • 0 comments

页面用:

实际build完之后,自动在 . 之前加了个 反斜杠 \,如下:

.m-2{margin:.5rem}.m-2\.5{margin:.625rem}

Nuxt:2.15.4 tailwind.config 配置如下:

const path = require('path');
module.exports = {
  mode: 'jit',
  purge: {
    enabled: true,
    content: [
      path.join(__dirname, './src/app.html'),
      path.join(__dirname, './src/**/*.vue'),
    ],
    options: {
      whitelist: ['html', 'body', 'nuxt-progress'],
    },
  },
};

xbf321 avatar Apr 13 '22 14:04 xbf321