workstar-compiler 0.2.2 → 0.2.3

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/src/vite.js +13 -3
  2. package/package.json +1 -1
package/dist/src/vite.js CHANGED
@@ -68,9 +68,16 @@ export function workstar(options = {}) {
68
68
  return;
69
69
  const runtime = options.runtimeImportSource ?? 'workstar/compat/react';
70
70
  const react = isAbsolute(runtime) ? `${runtime}/index.js` : runtime;
71
+ const jsxRuntime = isAbsolute(runtime)
72
+ ? `${runtime}/jsx-runtime.js`
73
+ : `${runtime}/jsx-runtime`;
74
+ const jsxDevRuntime = isAbsolute(runtime)
75
+ ? `${runtime}/jsx-dev-runtime.js`
76
+ : `${runtime}/jsx-dev-runtime`;
71
77
  const client = isAbsolute(runtime)
72
78
  ? `${runtime}/client.js`
73
79
  : `${runtime}/client`;
80
+ const dom = isAbsolute(runtime) ? `${runtime}/dom.js` : `${runtime}/dom`;
74
81
  const router = isAbsolute(runtime)
75
82
  ? resolve(runtime, '../react-router/index.js')
76
83
  : 'workstar/compat/react-router';
@@ -81,9 +88,12 @@ export function workstar(options = {}) {
81
88
  },
82
89
  resolve: {
83
90
  alias: [
84
- { find: 'react-router', replacement: router },
85
- { find: 'react-dom/client', replacement: client },
86
- { find: 'react', replacement: react },
91
+ { find: /^react-router$/, replacement: router },
92
+ { find: /^react-dom\/client$/, replacement: client },
93
+ { find: /^react-dom$/, replacement: dom },
94
+ { find: /^react\/jsx-dev-runtime$/, replacement: jsxDevRuntime },
95
+ { find: /^react\/jsx-runtime$/, replacement: jsxRuntime },
96
+ { find: /^react$/, replacement: react },
87
97
  ],
88
98
  },
89
99
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "workstar-compiler",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Component compiler and Vite plugin for Workstar applications.",
5
5
  "type": "module",
6
6
  "license": "MIT",