@tooltify/integration-rspack 0.1.4 → 0.1.5

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/index.js +3 -3
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -2,8 +2,9 @@
2
2
  import fs from "fs";
3
3
  import path from "path";
4
4
  import { fileURLToPath } from "url";
5
- import { startServer } from "@tooltify/core";
5
+ import { startServer, CLIENT_BUNDLE } from "@tooltify/core";
6
6
  var __dirname = path.dirname(fileURLToPath(import.meta.url));
7
+ console.log(CLIENT_BUNDLE);
7
8
  var CUSTOM_JSX_RUNTIME = path.resolve(__dirname, "./helpers/react-transform-source");
8
9
  function rspackTooltify({ publicUrl } = {}) {
9
10
  return {
@@ -17,12 +18,11 @@ function rspackTooltify({ publicUrl } = {}) {
17
18
  new compiler.rspack.DefinePlugin({
18
19
  __TOOLTIFY_PACKAGES_DIR__: JSON.stringify(config.packagesDir)
19
20
  }).apply(compiler);
20
- const CLIENT_BUNDLE_PATH = path.resolve(__dirname, "../../../core/client/dist/client.iife.js");
21
21
  compiler.hooks.compilation.tap("tooltify", (compilation) => {
22
22
  compilation.hooks.processAssets.tap(
23
23
  { name: "tooltify", stage: compiler.rspack.Compilation.PROCESS_ASSETS_STAGE_SUMMARIZE },
24
24
  (assets) => {
25
- const clientCode = fs.readFileSync(CLIENT_BUNDLE_PATH);
25
+ const clientCode = fs.readFileSync(CLIENT_BUNDLE);
26
26
  compilation.emitAsset(
27
27
  "tooltify.js",
28
28
  new compiler.rspack.sources.RawSource(clientCode)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tooltify/integration-rspack",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "peerDependencies": {
21
21
  "@rspack/core": "^1.7.8",
22
- "@tooltify/core": "^0.1.3"
22
+ "@tooltify/core": "^0.1.4"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@tooltify/core": "*"
@@ -40,4 +40,4 @@
40
40
  "url": "https://github.com/franwerner/tooltify.git",
41
41
  "directory": "integrations/rspack"
42
42
  }
43
- }
43
+ }