@webjourney/vite-plugins 1.2.2 → 1.2.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,YAAY;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,wBAAsB,YAAY,CAAC,OAAO,GAAE,YAAiB,iBA+C5D"}
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,YAAY;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,wBAAsB,YAAY,CAAC,OAAO,GAAE,YAAiB,iBA+C5D"}
package/dist/build.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { execSync } from 'node:child_process';
2
+ import { createRequire } from 'node:module';
2
3
  import fs from 'node:fs';
3
4
  import path from 'node:path';
4
5
  import { JSDOM } from 'jsdom';
@@ -98,8 +99,9 @@ async function prerender(projectRoot) {
98
99
  // Import the server entry after setting up globals
99
100
  const entryServerPath = toAbsolute('dist-ssr/.webjourney-entry-server.js');
100
101
  const { render } = await import(entryServerPath);
101
- // Dynamically import renderToString from the project's react-dom
102
- const reactDomServerPath = path.resolve(projectRoot, 'node_modules/react-dom/server');
102
+ // Use createRequire to properly resolve in hoisted workspaces
103
+ const require = createRequire(path.join(projectRoot, 'package.json'));
104
+ const reactDomServerPath = require.resolve('react-dom/server');
103
105
  const { renderToString } = await import(reactDomServerPath);
104
106
  // Extract routes from App.tsx
105
107
  const routes = await extractRoutes(projectRoot);
package/dist/cli.js CHANGED
File without changes
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAiBA,wBAAgB,uBAAuB;;;oBAKnB,MAAM,MAAM,MAAM;;;;EAkIrC;AAED,wBAAgB,sBAAsB;;;6BAKT,MAAM;EAIlC;AAED,wBAAgB,iBAAiB;;;oBA/Ib,MAAM,MAAM,MAAM;;;;;;;6BAyIT,MAAM;KAUlC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAeA,wBAAgB,uBAAuB;;;oBAKnB,MAAM,MAAM,MAAM;;;;EAkIrC;AAED,wBAAgB,sBAAsB;;;6BAKT,MAAM;EAIlC;AAED,wBAAgB,iBAAiB;;;oBA/Ib,MAAM,MAAM,MAAM;;;;;;;6BAyIT,MAAM;KAUlC"}
package/dist/index.js CHANGED
@@ -7,9 +7,7 @@ import path from 'path';
7
7
  const traverse = _traverse.default || _traverse;
8
8
  const generate = _generate.default || _generate;
9
9
  // Use local plugin for development, production URL for deployed sites
10
- const webjourneyPluginScriptHost = process.env.NODE_ENV === 'production'
11
- ? 'https://app.webjourney.pro'
12
- : 'http://127.0.0.1:3000';
10
+ const webjourneyPluginScriptHost = process.env.WEBJOURNEY_PLUGIN_SCRIPT_HOST || 'https://app.webjourney.pro';
13
11
  // Plugin to inject source mapping attributes for WYSIWYG editing
14
12
  export function webjourneyElementTagger() {
15
13
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webjourney/vite-plugins",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "description": "Vite plugins for Webjourney WYSIWYG editing",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",