tailwind-hyperclay 0.1.13 → 0.1.14

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.14] - 2026-01-31
4
+
5
+ ### Changed
6
+ - Add fallback module resolution from own node_modules
7
+
8
+
9
+
3
10
  ## [0.1.13] - 2026-01-12
4
11
 
5
12
  ### Changed
package/index.js CHANGED
@@ -54,7 +54,8 @@ async function compileTailwind(html) {
54
54
  // Determine base path for module resolution
55
55
  // - In packaged Electron apps: use app.asar.unpacked/node_modules
56
56
  // - In Electron dev mode or Node.js: use parent of __dirname (node_modules)
57
- let defaultBase = path.join(__dirname, '..'); // Default: node_modules directory
57
+ let defaultBase = path.join(__dirname, '..'); // Default: node_modules directory (when installed as a dep)
58
+ const ownBase = __dirname; // Fallback: resolve from own node_modules (when running from repo)
58
59
 
59
60
  if (process.versions.electron && process.resourcesPath) {
60
61
  const asarUnpackedPath = path.join(process.resourcesPath, 'app.asar.unpacked', 'node_modules');
@@ -70,7 +71,7 @@ async function compileTailwind(html) {
70
71
  const compiler = await compile(inputCSS, {
71
72
  loadStylesheet: async (id, base) => {
72
73
  let resolved;
73
- const searchPaths = [base || defaultBase];
74
+ const searchPaths = [base || defaultBase, ownBase];
74
75
 
75
76
  // Try resolving as-is first (for .css files)
76
77
  try {
@@ -93,13 +94,12 @@ async function compileTailwind(html) {
93
94
  return { content, base: path.dirname(resolved) };
94
95
  },
95
96
  loadModule: async (id, base) => {
96
- const resolved = require.resolve(id, { paths: [base || defaultBase] });
97
+ const resolved = require.resolve(id, { paths: [base || defaultBase, ownBase] });
97
98
  const mod = require(resolved);
98
99
  return { module: mod.default || mod, base: path.dirname(resolved) };
99
100
  },
100
101
  loadPlugin: async (plugin) => {
101
- // Plugins need to be found in the app's node_modules
102
- const resolved = require.resolve(plugin, { paths: [defaultBase] });
102
+ const resolved = require.resolve(plugin, { paths: [defaultBase, ownBase] });
103
103
  const mod = require(resolved);
104
104
  return mod.default || mod;
105
105
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tailwind-hyperclay",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "On-save Tailwind CSS generator for Hyperclay",
5
5
  "main": "index.js",
6
6
  "scripts": {