@spirobel/mininext 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/mininext.js +13 -1
  2. package/package.json +1 -1
package/dist/mininext.js CHANGED
@@ -47,6 +47,18 @@ const cryptoPlugin = {
47
47
  });
48
48
  },
49
49
  };
50
+ const nodeHttpsPlugin = {
51
+ name: "node https in the frontend",
52
+ setup(build) {
53
+ build.onResolve({ filter: /^https$/ }, (args) => {
54
+ const path_to_node_https_lib = path.resolve(projectRoot(), "node_modules/https-browserify/index.js");
55
+ if (path_to_node_https_lib)
56
+ return {
57
+ path: path_to_node_https_lib,
58
+ };
59
+ });
60
+ },
61
+ };
50
62
  async function buildBackend(backendPath = "backend/backend.ts") {
51
63
  global.FrontendScriptUrls = [];
52
64
  global.FrontendScripts = [];
@@ -92,7 +104,7 @@ async function buildFrontend(file) {
92
104
  naming: "[name]-[hash].[ext]",
93
105
  minify: Bun.argv[2] === "dev" ? false : true, //production
94
106
  target: "browser",
95
- plugins: [bufferPlugin, streamPlugin, cryptoPlugin],
107
+ plugins: [bufferPlugin, streamPlugin, cryptoPlugin, nodeHttpsPlugin],
96
108
  });
97
109
  if (!result?.outputs[0]?.path)
98
110
  console.log(result);
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "clean":"rm -rf ./dist"
12
12
  },
13
13
  "files": ["dist"],
14
- "version": "0.5.0",
14
+ "version": "0.5.1",
15
15
  "devDependencies": {
16
16
  "@types/bun": "latest"
17
17
  },