adding rollup-plugin-import-css

This commit is contained in:
ManishMadan2882
2024-02-29 04:11:47 +05:30
parent 192ce468b7
commit 5fffa8e9db
5 changed files with 72 additions and 27 deletions

View File

@@ -9,7 +9,7 @@ pnpm-debug.log*
lerna-debug.log*
node_modules
dist
*.local
# Editor directories and files
@@ -28,3 +28,5 @@ node_modules
# see npmjs.com/npmignore for more details.
src/
test/
README.md

View File

@@ -1,12 +1,13 @@
{
"name": "docsgpt-bot",
"version": "0.3.6",
"version": "0.3.9",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "docsgpt-bot",
"version": "0.3.6",
"version": "0.3.9",
"license": "Apache-2.0",
"dependencies": {
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-scroll-area": "^1.0.5",
@@ -15,12 +16,14 @@
"clsx": "^2.1.0",
"i": "^0.3.7",
"npm": "^10.4.0",
"npm-packlist": "^8.0.2",
"postcss-cli": "^11.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-markdown": "^9.0.1",
"react-syntax-highlighter": "^15.5.0",
"remark-gfm": "^4.0.0",
"rollup-plugin-import-css": "^3.5.0",
"tailwind-merge": "^2.2.1",
"tailwindcss-animate": "^1.0.7",
"vite-plugin-dts": "^3.7.3",
@@ -1414,7 +1417,6 @@
"cpu": [
"arm"
],
"dev": true,
"optional": true,
"os": [
"android"
@@ -1427,7 +1429,6 @@
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"android"
@@ -1440,7 +1441,6 @@
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"darwin"
@@ -1453,7 +1453,6 @@
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"darwin"
@@ -1466,7 +1465,6 @@
"cpu": [
"arm"
],
"dev": true,
"optional": true,
"os": [
"linux"
@@ -1479,7 +1477,6 @@
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"linux"
@@ -1492,7 +1489,6 @@
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"linux"
@@ -1505,7 +1501,6 @@
"cpu": [
"riscv64"
],
"dev": true,
"optional": true,
"os": [
"linux"
@@ -1518,7 +1513,6 @@
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"linux"
@@ -1531,7 +1525,6 @@
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"linux"
@@ -1544,7 +1537,6 @@
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"win32"
@@ -1557,7 +1549,6 @@
"cpu": [
"ia32"
],
"dev": true,
"optional": true,
"os": [
"win32"
@@ -1570,7 +1561,6 @@
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"win32"
@@ -4684,6 +4674,17 @@
"node": ">= 4"
}
},
"node_modules/ignore-walk": {
"version": "6.0.4",
"resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.4.tgz",
"integrity": "sha512-t7sv42WkwFkyKbivUCglsQW5YWMskWtbEf4MNKX5u/CCWHKSPzN4FtBQGsQZgCLbxOzpVlcbWVK5KB3auIOjSw==",
"dependencies": {
"minimatch": "^9.0.0"
},
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
}
},
"node_modules/import-cwd": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-3.0.0.tgz",
@@ -6579,6 +6580,17 @@
"node": "^18.17.0 || >=20.5.0"
}
},
"node_modules/npm-packlist": {
"version": "8.0.2",
"resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-8.0.2.tgz",
"integrity": "sha512-shYrPFIS/JLP4oQmAwDyk5HcyysKW8/JLTEA32S0Z5TzvpaeeX2yMFfoK1fjEBnCBvVyIB/Jj/GBFdm0wsgzbA==",
"dependencies": {
"ignore-walk": "^6.0.4"
},
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
}
},
"node_modules/npm/node_modules/@colors/colors": {
"version": "1.5.0",
"inBundle": true,
@@ -11730,7 +11742,6 @@
"version": "4.12.0",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.12.0.tgz",
"integrity": "sha512-wz66wn4t1OHIJw3+XU7mJJQV/2NAfw5OAk6G6Hoo3zcvz/XOfQ52Vgi+AN4Uxoxi0KBBwk2g8zPrTDA4btSB/Q==",
"devOptional": true,
"dependencies": {
"@types/estree": "1.0.5"
},
@@ -11758,6 +11769,20 @@
"fsevents": "~2.3.2"
}
},
"node_modules/rollup-plugin-import-css": {
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/rollup-plugin-import-css/-/rollup-plugin-import-css-3.5.0.tgz",
"integrity": "sha512-JOVow6n00qt2C/NnsqPmIjFOfxIAudwWqC5SaC84CodMGiMFaP1gPAdgnJ8g8hcG+P85TCYp2kI98grYCEt5pg==",
"dependencies": {
"@rollup/pluginutils": "^5.0.4"
},
"engines": {
"node": ">=16"
},
"peerDependencies": {
"rollup": "^2.x.x || ^3.x.x || ^4.x.x"
}
},
"node_modules/rollup-plugin-postcss": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/rollup-plugin-postcss/-/rollup-plugin-postcss-4.0.2.tgz",

View File

@@ -2,8 +2,7 @@
"name": "docsgpt-bot",
"private": false,
"description": "docsgpt-widget",
"homepage": "https://github.com/arc53/DocsGPT#readme",
"version": "0.3.6",
"version": "0.3.9",
"type": "module",
"main": "dist/index.umd.js",
"module": "dist/index.es.js",
@@ -13,12 +12,8 @@
"import": "./dist/index.es.js",
"require": "./dist/index.umd.js",
"types": "./dist/index.d.ts"
},
"./dist/style.css": "./dist/style.css"
}
},
"files": [
"/dist"
],
"publishConfig": {
"access": "public"
},
@@ -38,12 +33,14 @@
"clsx": "^2.1.0",
"i": "^0.3.7",
"npm": "^10.4.0",
"npm-packlist": "^8.0.2",
"postcss-cli": "^11.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-markdown": "^9.0.1",
"react-syntax-highlighter": "^15.5.0",
"remark-gfm": "^4.0.0",
"rollup-plugin-import-css": "^3.5.0",
"tailwind-merge": "^2.2.1",
"tailwindcss-animate": "^1.0.7",
"vite-plugin-dts": "^3.7.3",
@@ -71,5 +68,19 @@
"typescript": "^5.2.2",
"vite": "^5.1.0",
"vite-plugin-scope-tailwind": "^1.1.10"
}
},
"keywords": [
"docsgpt",
"chatbot",
"assistant",
"ai",
"chatdocs",
"widget"
],
"author": "Arc53",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/arc53/DocsGPT/issues"
},
"homepage": "https://github.com/arc53/DocsGPT#readme"
}

View File

@@ -30,5 +30,6 @@
},
/* include /index.ts*/
"include": ["src", "./index.ts"],
"exclude": ["node_modules","dist"],
"references": [{ "path": "./tsconfig.node.json" }]
}

View File

@@ -2,6 +2,8 @@ import path from "path"
import react from "@vitejs/plugin-react"
import { defineConfig } from "vite"
import dts from "vite-plugin-dts";
import css from "rollup-plugin-import-css";
export default defineConfig({
build: {
@@ -15,6 +17,7 @@ export default defineConfig({
//name for different formats during the build
fileName: (format) => `index.${format}.js`,
},
cssCodeSplit: false,
rollupOptions: {
external: ["react", "react-dom"],
output: {
@@ -26,11 +29,14 @@ export default defineConfig({
},
//Generates sourcemaps for the built files,
//aiding in debugging.
sourcemap: true,
sourcemap: 'inline',
//Clears the output directory before building.
emptyOutDir: true,
},
plugins: [react(), dts()],
plugins: [react(), dts(),css({
inject:true,
include:['./src/index.css']
})],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),