refactor: move to vite bundler
This commit is contained in:
parent
f08c87c184
commit
acb87c1531
|
@ -3,7 +3,15 @@
|
||||||
"@lumeweb/presetter-kernel-module-preset"
|
"@lumeweb/presetter-kernel-module-preset"
|
||||||
],
|
],
|
||||||
"config": {
|
"config": {
|
||||||
"official": true,
|
"vite": {
|
||||||
"browser": true
|
"resolve": {
|
||||||
|
"alias": {
|
||||||
|
"timers": "timers-browserify"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"optimize": {
|
||||||
|
"node-fetch": "export default undefined;"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
15
package.json
15
package.json
|
@ -15,14 +15,16 @@
|
||||||
"_id": "@lumeweb/kernel-handshake-node@",
|
"_id": "@lumeweb/kernel-handshake-node@",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "presetter bootstrap",
|
"prepare": "presetter bootstrap",
|
||||||
"build": "shx echo 'export default undefined;' > nop.js; run build",
|
"build": "run build",
|
||||||
"semantic-release": "semantic-release"
|
"semantic-release": "semantic-release",
|
||||||
|
"postinstall": "patch-package"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@lumeweb/presetter-kernel-module-preset": "^0.1.0-develop.30",
|
"@lumeweb/presetter-kernel-module-preset": "^0.1.0-develop.34",
|
||||||
"@rollup/plugin-alias": "^5.0.0",
|
"patch-package": "^7.0.0",
|
||||||
"presetter": "*",
|
"presetter": "*",
|
||||||
"rollup-plugin-ignore-import": "^1.3.2"
|
"timers-browserify": "^2.0.12",
|
||||||
|
"vite": "^4.4.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@i2labs/dns": "^1.0.1",
|
"@i2labs/dns": "^1.0.1",
|
||||||
|
@ -31,7 +33,6 @@
|
||||||
"@lumeweb/libkernel": "^0.1.0-develop.14",
|
"@lumeweb/libkernel": "^0.1.0-develop.14",
|
||||||
"assert": "^2.0.0",
|
"assert": "^2.0.0",
|
||||||
"hsd": "^5.0.1",
|
"hsd": "^5.0.1",
|
||||||
"p-defer": "^4.0.0",
|
"p-defer": "^4.0.0"
|
||||||
"timers-browserify": "^2.0.12"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,67 +0,0 @@
|
||||||
// @ts-nocheck
|
|
||||||
import * as import0 from "@rollup/plugin-json";
|
|
||||||
import * as import1 from "@rollup/plugin-node-resolve";
|
|
||||||
import * as import2 from "@rollup/plugin-commonjs";
|
|
||||||
import * as import3 from "@rollup/plugin-graphql";
|
|
||||||
import * as import4 from "@rollup/plugin-image";
|
|
||||||
import * as import5 from "@rollup/plugin-yaml";
|
|
||||||
import * as import6 from "rollup-plugin-postcss";
|
|
||||||
import * as import7 from "rollup-plugin-visualizer";
|
|
||||||
import * as import8 from "@rollup/plugin-wasm";
|
|
||||||
import * as import9 from "@rollup/plugin-alias";
|
|
||||||
import * as import10 from "rollup-plugin-ignore-import";
|
|
||||||
export default {
|
|
||||||
input: "build/index.js",
|
|
||||||
output: [
|
|
||||||
{
|
|
||||||
file: "lib/index.js",
|
|
||||||
format: "cjs",
|
|
||||||
sourcemap: true,
|
|
||||||
inlineDynamicImports: true,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
plugins: [
|
|
||||||
import0.default(...([] as const)),
|
|
||||||
import10.default({
|
|
||||||
include: [
|
|
||||||
"**/multiSocket/tcpSocket.js",
|
|
||||||
"**/node-fetch/**",
|
|
||||||
"**/urkel/lib/file.js",
|
|
||||||
],
|
|
||||||
exclude: [],
|
|
||||||
}),
|
|
||||||
import9.default({
|
|
||||||
entries: {
|
|
||||||
timers: "timers-browserify",
|
|
||||||
stream: "./nop.js",
|
|
||||||
blgr: "blgr/lib/fs-browser.js",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
import1.default(
|
|
||||||
...([
|
|
||||||
{
|
|
||||||
browser: true,
|
|
||||||
preferBuiltins: false,
|
|
||||||
dedupe: [
|
|
||||||
"@lumeweb/libkernel",
|
|
||||||
"@lumeweb/libweb",
|
|
||||||
"@lumeweb/libportal",
|
|
||||||
],
|
|
||||||
},
|
|
||||||
] as const),
|
|
||||||
),
|
|
||||||
import2.default(
|
|
||||||
...([{ extensions: [".js", ".jsx", ".ts", ".tsx"] }] as const),
|
|
||||||
),
|
|
||||||
import10.default({
|
|
||||||
include: [/.*commonjs-external/],
|
|
||||||
exclude: [],
|
|
||||||
}),
|
|
||||||
import3.default(...([] as const)),
|
|
||||||
import4.default(...([] as const)),
|
|
||||||
import5.default(...([] as const)),
|
|
||||||
import6.default(...([{ inject: { insertAt: "top" } }] as const)),
|
|
||||||
import7.visualizer(...([] as const)),
|
|
||||||
import8.default(...([{ targetEnv: "auto-inline" }] as const)),
|
|
||||||
],
|
|
||||||
};
|
|
Loading…
Reference in New Issue