refactor: move to vite bundler
This commit is contained in:
parent
af224e742a
commit
cb3421b662
|
@ -3,7 +3,12 @@
|
|||
"@lumeweb/presetter-kernel-module-preset"
|
||||
],
|
||||
"config": {
|
||||
"official": true,
|
||||
"browser": true
|
||||
"vite": {
|
||||
"resolve": {
|
||||
"alias": {
|
||||
"sodium-universal": "@screamingvoid/sodium-universal"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -10,14 +10,14 @@
|
|||
},
|
||||
"scripts": {
|
||||
"prepare": "presetter bootstrap",
|
||||
"build": "shx touch nop.js; run build",
|
||||
"build": "run build",
|
||||
"semantic-release": "semantic-release",
|
||||
"postinstall": "patch-package"
|
||||
},
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@lumeweb/hyperswarm-web": "0.0.2-develop.7",
|
||||
"@lumeweb/libkernel": "^0.1.0-develop.13",
|
||||
"@lumeweb/libkernel": "^0.1.0-develop.14",
|
||||
"@lumeweb/rpc": "0.0.2-develop.1",
|
||||
"@noble/curves": "^1.1.0",
|
||||
"@peculiar/webcrypto": "^1.4.3",
|
||||
|
@ -31,7 +31,7 @@
|
|||
"protomux": "^3.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@lumeweb/presetter-kernel-module-preset": "^0.1.0-develop.29",
|
||||
"@lumeweb/presetter-kernel-module-preset": "^0.1.0-develop.38",
|
||||
"@rollup/plugin-alias": "^5.0.0",
|
||||
"@types/b4a": "^1.6.0",
|
||||
"crypto-browserify": "^3.12.0",
|
||||
|
|
|
@ -1,66 +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";
|
||||
|
||||
const customResolver = import1.default({
|
||||
extensions: [".js"],
|
||||
browser: true,
|
||||
});
|
||||
export default {
|
||||
input: "build/index.js",
|
||||
output: [
|
||||
{
|
||||
file: "lib/index.js",
|
||||
format: "cjs",
|
||||
sourcemap: false,
|
||||
inlineDynamicImports: true,
|
||||
},
|
||||
],
|
||||
plugins: [
|
||||
import0.default(...([] as const)),
|
||||
import9.default({
|
||||
entries: {
|
||||
"crypto": "crypto-browserify",
|
||||
"sodium-universal": "@screamingvoid/sodium-universal",
|
||||
},
|
||||
customResolver,
|
||||
}),
|
||||
import9.default({
|
||||
entries: {
|
||||
"node-fetch": "./nop.js",
|
||||
"stream": "./nop.js",
|
||||
"formdata-polyfill/formdata-to-blob.js": "./nop.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),
|
||||
),
|
||||
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