rollup-plugin-css-only icon indicating copy to clipboard operation
rollup-plugin-css-only copied to clipboard

Output css file don't have file extension

Open Clloz opened this issue 1 year ago • 0 comments

rollup.config.js file

import css from 'rollup-plugin-css-only'

export default {
  input: 'src/index.js',
  output: {
    file: 'dist/bundle.js',
    format: 'cjs',
    assetFileNames: '[name]-[hash][extname]'
  },
  plugins: [
    css()
  ]
}

src/index.js

import './style.css'

src/style.css

body {
    background: black'
}

run rollup -c,the output css file was asset-Nq2sMGzG,without css extension.

Clloz avatar Jan 09 '24 11:01 Clloz