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

Output css file don't have file extension #59

Open
Clloz opened this issue Jan 9, 2024 · 0 comments
Open

Output css file don't have file extension #59

Clloz opened this issue Jan 9, 2024 · 0 comments

Comments

@Clloz
Copy link

Clloz commented Jan 9, 2024

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 Clloz changed the title Output css file don't have extension name Output css file don't have file extension Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant