@luxfi/ui 7.4.8 → 7.4.9

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/dist/next.cjs CHANGED
@@ -107,14 +107,6 @@ function guiAliases(from) {
107
107
  function withLuxUi(config = {}) {
108
108
  const userWebpack = config.webpack;
109
109
  const engine = guiAliases(config.dir ?? process.cwd());
110
- const root = config.dir ?? process.cwd();
111
- const path = __require("path");
112
- const engineTurbopack = {};
113
- for (const [key, abs] of Object.entries(engine)) {
114
- const rel = path.relative(root, abs);
115
- if (rel.startsWith("..") || path.isAbsolute(rel)) continue;
116
- engineTurbopack[key.replace(/\$$/, "")] = `./${rel}`;
117
- }
118
110
  const { dir: _dir, ...rest } = config;
119
111
  return {
120
112
  ...rest,
@@ -123,7 +115,6 @@ function withLuxUi(config = {}) {
123
115
  ...config.turbopack,
124
116
  resolveAlias: {
125
117
  "react-native": "react-native-web",
126
- ...engineTurbopack,
127
118
  ...config.turbopack?.resolveAlias
128
119
  }
129
120
  },
package/dist/next.js CHANGED
@@ -105,14 +105,6 @@ function guiAliases(from) {
105
105
  function withLuxUi(config = {}) {
106
106
  const userWebpack = config.webpack;
107
107
  const engine = guiAliases(config.dir ?? process.cwd());
108
- const root = config.dir ?? process.cwd();
109
- const path = __require("path");
110
- const engineTurbopack = {};
111
- for (const [key, abs] of Object.entries(engine)) {
112
- const rel = path.relative(root, abs);
113
- if (rel.startsWith("..") || path.isAbsolute(rel)) continue;
114
- engineTurbopack[key.replace(/\$$/, "")] = `./${rel}`;
115
- }
116
108
  const { dir: _dir, ...rest } = config;
117
109
  return {
118
110
  ...rest,
@@ -121,7 +113,6 @@ function withLuxUi(config = {}) {
121
113
  ...config.turbopack,
122
114
  resolveAlias: {
123
115
  "react-native": "react-native-web",
124
- ...engineTurbopack,
125
116
  ...config.turbopack?.resolveAlias
126
117
  }
127
118
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luxfi/ui",
3
- "version": "7.4.8",
3
+ "version": "7.4.9",
4
4
  "description": "Cross-platform DeFi UI components built on @hanzo/gui (Tamagui). Native mobile + web.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/next.ts CHANGED
@@ -49,28 +49,23 @@ export function withLuxUi(config: LuxUiNextConfig = {}): LuxUiNextConfig {
49
49
  // so the equivalent is an exact-match alias per package, resolved from the app
50
50
  // root — see ./engine for why two copies is a crash and not a size problem.
51
51
  const engine = guiAliases(config.dir ?? process.cwd());
52
- // The same dedupe for Turbopack, which is the ONLY dev bundler from Next 16 —
53
- // `webpack()` below is never called by `next dev`, so a webpack-only alias map
54
- // deduped production and left development with N copies of `@hanzogui/popper`
55
- // and the `Cannot read properties of undefined (reading 'setReference')`
56
- // storm that comes with them.
52
+ // Turbopack gets `react-native` and NOTHING ELSE, on purpose.
53
+ //
54
+ // It is the only dev bundler from Next 16, so a path-based dedupe here looked
55
+ // like the way to kill the dev-mode `setReference` storm. It is not. Turbopack
56
+ // resolves an alias VALUE against its own project root, which it infers from
57
+ // the workspace and which is not the app directory: an absolute value comes
58
+ // back as `Can't resolve './Users/…/react/index.js' — server relative imports
59
+ // are not implemented yet`, and a value made relative to `dir` re-anchors to
60
+ // that other root and mis-resolves Next's own runtime — the bootnode console
61
+ // 500'd on every route with `Could not find the module
62
+ // "[project]/work/hanzo/bootnode/web/…/global-error.js#default" in the React
63
+ // Client Manifest`.
64
+ //
65
+ // Prod builds still dedupe through `webpack()` below. A dev-only duplicate is
66
+ // a package-manager problem and belongs in the app's `pnpm.overrides`, not in
67
+ // an alias map that can take the dev server down.
57
68
  //
58
- // Two shape differences from webpack, both load-bearing:
59
- // - no `$` exact-match suffix; a bare key is already exact.
60
- // - an ABSOLUTE path is not a valid alias value. Turbopack reads it as a
61
- // server-relative URL and fails with `Can't resolve
62
- // './Users/.../react/index.js' — server relative imports are not
63
- // implemented yet`, which takes the whole dev server down. The value has
64
- // to be a project-relative `./…` specifier, so a package resolved outside
65
- // the project root is skipped rather than mis-aliased.
66
- const root = config.dir ?? process.cwd();
67
- const path = require('node:path') as typeof import('node:path');
68
- const engineTurbopack: Record<string, string> = {};
69
- for (const [ key, abs ] of Object.entries(engine)) {
70
- const rel = path.relative(root, abs);
71
- if (rel.startsWith('..') || path.isAbsolute(rel)) continue;
72
- engineTurbopack[key.replace(/\$$/, '')] = `./${ rel }`;
73
- }
74
69
  // `dir` is OURS, not Next's — leaving it on the returned object makes Next
75
70
  // print `Unrecognized key(s) in object: 'dir'` on every boot of every surface
76
71
  // that passes it. Consume it here.
@@ -82,7 +77,6 @@ export function withLuxUi(config: LuxUiNextConfig = {}): LuxUiNextConfig {
82
77
  ...config.turbopack,
83
78
  resolveAlias: {
84
79
  'react-native': 'react-native-web',
85
- ...engineTurbopack,
86
80
  ...config.turbopack?.resolveAlias,
87
81
  },
88
82
  },