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

Imported CSS missing #1296

Open
DavidPetrasek opened this issue Feb 14, 2025 · 0 comments
Open

Imported CSS missing #1296

DavidPetrasek opened this issue Feb 14, 2025 · 0 comments

Comments

@DavidPetrasek
Copy link

DavidPetrasek commented Feb 14, 2025

In ./src/index.ts I do:
import './style.css';

... but the build files .mjs and .js does not contain this import. Only thing which happens is style.css is copied into ./dist folder and is renamed to index.css. Then I have to manually add these missing imports to build files.

I want the build files to also contain this import, so the CSS is automatically consumed.

My tsup.config.ts:

import { defineConfig } from 'tsup'

export default defineConfig({
  entry: ['src/index.ts'],
  format: ["cjs", "esm"],
  dts: true,  
  splitting: false,
  sourcemap: true,
  clean: true,
})
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