Compare commits

...

3 Commits

4 changed files with 25 additions and 12 deletions

View File

@ -1,3 +1,5 @@
# [0.1.0-develop.5](https://git.lumeweb.com/LumeWeb/sdk/compare/v0.1.0-develop.4...v0.1.0-develop.5) (2023-10-09)
# [0.1.0-develop.4](https://git.lumeweb.com/LumeWeb/sdk/compare/v0.1.0-develop.3...v0.1.0-develop.4) (2023-10-09) # [0.1.0-develop.4](https://git.lumeweb.com/LumeWeb/sdk/compare/v0.1.0-develop.3...v0.1.0-develop.4) (2023-10-09)

15
npm-shrinkwrap.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "@lumeweb/sdk", "name": "@lumeweb/sdk",
"version": "0.1.0-develop.4", "version": "0.1.0-develop.5",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@lumeweb/sdk", "name": "@lumeweb/sdk",
"version": "0.1.0-develop.4", "version": "0.1.0-develop.5",
"dependencies": { "dependencies": {
"@lumeweb/kernel-network-registry-client": "0.1.0-develop.10", "@lumeweb/kernel-network-registry-client": "0.1.0-develop.10",
"@lumeweb/libkernel": "0.1.0-develop.65", "@lumeweb/libkernel": "0.1.0-develop.65",
@ -62,6 +62,7 @@
"uniqid": "^5.4.0", "uniqid": "^5.4.0",
"vite": "^4.4.11", "vite": "^4.4.11",
"vite-plugin-dts": "^3.6.0", "vite-plugin-dts": "^3.6.0",
"vite-plugin-no-bundle": "^3.0.0",
"vite-plugin-node-polyfills": "^0.15.0", "vite-plugin-node-polyfills": "^0.15.0",
"vite-plugin-optimizer": "^1.4.2", "vite-plugin-optimizer": "^1.4.2",
"vite-plugin-scope-tailwind": "^1.1.3", "vite-plugin-scope-tailwind": "^1.1.3",
@ -28204,6 +28205,16 @@
} }
} }
}, },
"node_modules/vite-plugin-no-bundle": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/vite-plugin-no-bundle/-/vite-plugin-no-bundle-3.0.0.tgz",
"integrity": "sha512-B8O4ZmWHbA8MWhsCqjcxwCLW5Kk2Q1Ax7JhZBBB/ort+DNONkBA2HND0d9lQ5d0Q+JSOMYAQDDQ1qAS1nmThyA==",
"dev": true,
"dependencies": {
"fast-glob": "^3.2.12",
"micromatch": "^4.0.5"
}
},
"node_modules/vite-plugin-node-polyfills": { "node_modules/vite-plugin-node-polyfills": {
"version": "0.15.0", "version": "0.15.0",
"resolved": "https://registry.npmjs.org/vite-plugin-node-polyfills/-/vite-plugin-node-polyfills-0.15.0.tgz", "resolved": "https://registry.npmjs.org/vite-plugin-node-polyfills/-/vite-plugin-node-polyfills-0.15.0.tgz",

View File

@ -1,9 +1,8 @@
{ {
"name": "@lumeweb/sdk", "name": "@lumeweb/sdk",
"version": "0.1.0-develop.4", "version": "0.1.0-develop.5",
"type": "module", "type": "module",
"main": "lib/lib.umd.js", "main": "lib/index.js",
"module": "lib/lib.es.js",
"types": "lib/index.d.ts", "types": "lib/index.d.ts",
"repository": { "repository": {
"type": "git", "type": "git",
@ -74,6 +73,7 @@
"uniqid": "^5.4.0", "uniqid": "^5.4.0",
"vite": "^4.4.11", "vite": "^4.4.11",
"vite-plugin-dts": "^3.6.0", "vite-plugin-dts": "^3.6.0",
"vite-plugin-no-bundle": "^3.0.0",
"vite-plugin-node-polyfills": "^0.15.0", "vite-plugin-node-polyfills": "^0.15.0",
"vite-plugin-optimizer": "^1.4.2", "vite-plugin-optimizer": "^1.4.2",
"vite-plugin-scope-tailwind": "^1.1.3", "vite-plugin-scope-tailwind": "^1.1.3",

View File

@ -4,8 +4,8 @@ import scopeTailwind from "vite-plugin-scope-tailwind";
import { resolve } from "path"; import { resolve } from "path";
import svgr from "vite-plugin-svgr"; import svgr from "vite-plugin-svgr";
import dts from "vite-plugin-dts"; import dts from "vite-plugin-dts";
import { nodePolyfills } from "vite-plugin-node-polyfills";
import optimizer from "vite-plugin-optimizer"; import optimizer from "vite-plugin-optimizer";
import noBundlePlugin from "vite-plugin-no-bundle";
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
@ -20,11 +20,7 @@ export default defineConfig({
"node-fetch": "node-fetch":
"const e = undefined; export default e;export {e as Response, e as FormData, e as Blob};", "const e = undefined; export default e;export {e as Response, e as FormData, e as Blob};",
}), }),
nodePolyfills({ noBundlePlugin(),
exclude: ["fs"],
globals: { Buffer: true, global: true, process: true },
}),
// css({ output: 'styles/globals.css' })
], ],
resolve: { resolve: {
dedupe: ["@lumeweb/libportal", "@lumeweb/libweb", "@lumeweb/libkernel"], dedupe: ["@lumeweb/libportal", "@lumeweb/libweb", "@lumeweb/libkernel"],
@ -45,9 +41,13 @@ export default defineConfig({
lib: { lib: {
entry: resolve(__dirname, "src/index.ts"), entry: resolve(__dirname, "src/index.ts"),
name: "sdk", name: "sdk",
fileName: (format) => `lib.${format}.js`, fileName: "index",
formats: ["es"],
}, },
rollupOptions: { rollupOptions: {
output: {
inlineDynamicImports: false,
},
external: ["react", "react-dom"], external: ["react", "react-dom"],
}, },
}, },