feat: add vite-plugin-css-injected-by-js for improved CSS handling and update app import path
All checks were successful
Publish to npm / publish (push) Successful in 26s
All checks were successful
Publish to npm / publish (push) Successful in 26s
This commit is contained in:
parent
c0b833be6f
commit
6fdcd80710
11
package-lock.json
generated
11
package-lock.json
generated
|
@ -23,6 +23,7 @@
|
|||
"typescript": "~5.7.2",
|
||||
"typescript-eslint": "^8.22.0",
|
||||
"vite": "^6.1.0",
|
||||
"vite-plugin-css-injected-by-js": "^3.5.2",
|
||||
"vite-plugin-dts": "^4.5.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
@ -4523,6 +4524,16 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"node_modules/vite-plugin-css-injected-by-js": {
|
||||
"version": "3.5.2",
|
||||
"resolved": "https://registry.npmjs.org/vite-plugin-css-injected-by-js/-/vite-plugin-css-injected-by-js-3.5.2.tgz",
|
||||
"integrity": "sha512-2MpU/Y+SCZyWUB6ua3HbJCrgnF0KACAsmzOQt1UvRVJCGF6S8xdA3ZUhWcWdM9ivG4I5az8PnQmwwrkC2CAQrQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"vite": ">2.0.0-0"
|
||||
}
|
||||
},
|
||||
"node_modules/vite-plugin-dts": {
|
||||
"version": "4.5.0",
|
||||
"resolved": "https://registry.npmjs.org/vite-plugin-dts/-/vite-plugin-dts-4.5.0.tgz",
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
"typescript": "~5.7.2",
|
||||
"typescript-eslint": "^8.22.0",
|
||||
"vite": "^6.1.0",
|
||||
"vite-plugin-css-injected-by-js": "^3.5.2",
|
||||
"vite-plugin-dts": "^4.5.0"
|
||||
},
|
||||
"exports": {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React from 'react'
|
||||
import { SingleDatePicker } from "../src/index.ts"
|
||||
import { SingleDatePicker } from "../dist/index.es"
|
||||
import './app.scss'
|
||||
|
||||
export default () => {
|
||||
|
|
|
@ -2,6 +2,7 @@ import { defineConfig } from 'vite'
|
|||
import react from '@vitejs/plugin-react'
|
||||
import dts from 'vite-plugin-dts'
|
||||
import path from "path"
|
||||
import cssInjectedByJsPlugin from "vite-plugin-css-injected-by-js"
|
||||
|
||||
export default defineConfig(({mode}) => ({
|
||||
build: {
|
||||
|
@ -11,6 +12,7 @@ export default defineConfig(({mode}) => ({
|
|||
fileName: format => `index.${format}.js`,
|
||||
},
|
||||
rollupOptions: {
|
||||
preserveEntrySignatures: "strict",
|
||||
external: ["react"],
|
||||
output: {
|
||||
globals: {
|
||||
|
@ -31,6 +33,7 @@ export default defineConfig(({mode}) => ({
|
|||
dts({
|
||||
tsconfigPath: "./tsconfig.app.json"
|
||||
}),
|
||||
cssInjectedByJsPlugin()
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
|
|
Loading…
Reference in New Issue
Block a user