I have successfully developed a React TypeScript NPM package, which includes my code along with package.json
and tsconfig.json
. However, I also have several CSS files that I would like to incorporate into my package. Below is my tsconfig.json
:
{
"compilerOptions": {
"outDir": "./dist",
"target": "es5",
"esModuleInterop": true,
"module": "commonjs",
"moduleResolution": "node",
"noImplicitAny": true,
"removeComments": true,
"declaration": true,
"jsx": "react",
"lib": [ "es2015", "dom" ],
"sourceMap": false
},
"files": [
"src/index.tsx"
],
"include": [
"src/**/*"
],
"exclude": [
"node_modules"
]
}
My challenge lies in the fact that after running tsc
in my directory, all of the .js and .d.ts files are created within the /dist folder, yet none of the CSS files are included. What steps should I take to ensure that CSS files are properly integrated?