#Style not found on npm package

1 messages · Page 1 of 1 (latest)

pale minnow
#

Good afternoon. When building an NPM package on ReactTS, their styles are not attached to the components. Styles are written through the module. When launched normally, components are displayed with styles. Please tell me what could be the problem when assembling with styles?

#

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import styles from 'rollup-plugin-styles';

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), styles()],
build: {
lib: {
entry: 'lib/index.js',
name: 'my-library',
fileName: 'my-library'
},
rollupOptions: {
external: ['react', 'react-dom'],
output: {
globals: {
react: 'React',
'react-dom': 'ReactDOM'
}
}
}
}
})

Next Generation Frontend Tooling

final spoke