-
-
Notifications
You must be signed in to change notification settings - Fork 261
Closed
Labels
Description
Hello, @egoist I encount a problem with dts-only usage.
- I use vite to bundle my react-app with scss
- I want to use tsup to bundle my types to single dts file
But tsup will failed to work because it can't parse scss file in my component.
My CLI
tsup src/index.ts --dts-only -d dist
Error Message
> @easynm/react-gallery@1.0.0 build-dts /Users/Ritchie/Developer/@easynm/cloud/components/react-gallery
> tsup src/index.ts --dts-only -d dist
CLI Building entry: src/index.ts
CLI Using tsconfig: tsconfig.json
CLI tsup v5.11.11
DTS Build start
DTS Build error
Error parsing: /Users/Ritchie/Developer/@easynm/cloud/components/react-gallery/src/styles/react-gallery.scss:1:0
Unexpected character '@' (Note that you need plugins to import files that are not JavaScript)
1: @keyframes gallery-loading-spinner {
^
2: 0% {
3: transform: rotate(0deg);
ELIFECYCLE Command failed with exit code 1.
ELIFECYCLE Command failed with exit code 1.
What I want
I want to ignore less/scss parse when I use --dts-only
option, hope for ur help, Happly Lunar New Year 🐯