@tamagui/next-plugin 1.13.3 → 1.14.0
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/cjs/index.js +1 -18
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/withTamagui.js +1 -347
- package/dist/cjs/withTamagui.js.map +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/withTamagui.js +1 -313
- package/dist/esm/withTamagui.js.map +2 -2
- package/dist/esm/withTamagui.mjs +1 -313
- package/dist/esm/withTamagui.mjs.map +2 -2
- package/package.json +6 -6
package/dist/cjs/index.js
CHANGED
|
@@ -1,19 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
-
var src_exports = {};
|
|
17
|
-
module.exports = __toCommonJS(src_exports);
|
|
18
|
-
__reExport(src_exports, require("./withTamagui"), module.exports);
|
|
1
|
+
"use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(r,o,f,x)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of c(o))!d.call(r,e)&&e!==f&&a(r,e,{get:()=>o[e],enumerable:!(x=b(o,e))||x.enumerable});return r},t=(r,o,f)=>(p(r,o,"default"),f&&p(f,o,"default"));var g=r=>p(a({},"__esModule",{value:!0}),r);var m={};module.exports=g(m);t(m,require("./withTamagui"),module.exports);
|
|
19
2
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
4
|
"sourcesContent": ["export * from './withTamagui'\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "iaAAA,IAAAA,EAAA,kBAAAC,EAAAD,GAAAE,EAAAF,EAAc,yBAAd",
|
|
6
|
+
"names": ["src_exports", "__toCommonJS", "__reExport"]
|
|
7
7
|
}
|
package/dist/cjs/withTamagui.js
CHANGED
|
@@ -1,348 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var withTamagui_exports = {};
|
|
30
|
-
__export(withTamagui_exports, {
|
|
31
|
-
withTamagui: () => withTamagui
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(withTamagui_exports);
|
|
34
|
-
var import_fs = require("fs");
|
|
35
|
-
var import_path = __toESM(require("path"));
|
|
36
|
-
var import_browserslist = __toESM(require("browserslist"));
|
|
37
|
-
var import_esm_resolve = __toESM(require("esm-resolve"));
|
|
38
|
-
var import_css = require("next/dist/build/webpack/config/blocks/css");
|
|
39
|
-
var import_loaders = require("next/dist/build/webpack/config/blocks/css/loaders");
|
|
40
|
-
var import_tamagui_loader = require("tamagui-loader");
|
|
41
|
-
var import_webpack = __toESM(require("webpack"));
|
|
42
|
-
const withTamagui = (tamaguiOptions) => {
|
|
43
|
-
return (nextConfig = {}) => {
|
|
44
|
-
return {
|
|
45
|
-
...nextConfig,
|
|
46
|
-
webpack: (webpackConfig, options) => {
|
|
47
|
-
var _a;
|
|
48
|
-
const { dir, config, dev, isServer } = options;
|
|
49
|
-
const resolver = (0, import_esm_resolve.default)((0, import_path.join)(dir, "index.js"), {
|
|
50
|
-
constraints: "node"
|
|
51
|
-
});
|
|
52
|
-
if (typeof globalThis["__DEV__"] === "undefined") {
|
|
53
|
-
globalThis["__DEV__"] = dev;
|
|
54
|
-
}
|
|
55
|
-
const isNext12 = typeof ((_a = options.config) == null ? void 0 : _a.swcMinify) === "boolean";
|
|
56
|
-
if (!isNext12) {
|
|
57
|
-
throw new Error(`Next.js 12 only supported`);
|
|
58
|
-
}
|
|
59
|
-
const prefix = `${isServer ? " ssr " : " web "} |`;
|
|
60
|
-
const safeResolves = (resolves, multiple = false) => {
|
|
61
|
-
var _a2;
|
|
62
|
-
const res = [];
|
|
63
|
-
for (const [out, mod] of resolves) {
|
|
64
|
-
if (out.endsWith("$")) {
|
|
65
|
-
res.push([out, mod]);
|
|
66
|
-
continue;
|
|
67
|
-
}
|
|
68
|
-
try {
|
|
69
|
-
res.push([out, resolveEsm(mod)]);
|
|
70
|
-
if (multiple) {
|
|
71
|
-
res.push([out, resolveEsm(mod, true)]);
|
|
72
|
-
}
|
|
73
|
-
} catch (err) {
|
|
74
|
-
if (out.includes(`@gorhom/bottom-sheet`)) {
|
|
75
|
-
continue;
|
|
76
|
-
}
|
|
77
|
-
if ((_a2 = process.env.DEBUG) == null ? void 0 : _a2.startsWith("tamagui")) {
|
|
78
|
-
console.log(prefix, `withTamagui skipping resolving ${out}`, err);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return res;
|
|
83
|
-
};
|
|
84
|
-
const resolveEsm = (relativePath, onlyRequire = false) => {
|
|
85
|
-
if (isServer || onlyRequire) {
|
|
86
|
-
return require.resolve(relativePath);
|
|
87
|
-
}
|
|
88
|
-
const esm = resolver(relativePath);
|
|
89
|
-
return esm ? import_path.default.join(dir, esm) : require.resolve(relativePath);
|
|
90
|
-
};
|
|
91
|
-
const SEP = import_path.default.sep;
|
|
92
|
-
const componentsFullPaths = safeResolves(
|
|
93
|
-
tamaguiOptions.components.map(
|
|
94
|
-
(moduleName) => [moduleName, moduleName]
|
|
95
|
-
),
|
|
96
|
-
true
|
|
97
|
-
);
|
|
98
|
-
const componentsBaseDirs = componentsFullPaths.map(([_, fullPath]) => {
|
|
99
|
-
let rootPath = (0, import_path.dirname)(fullPath);
|
|
100
|
-
while (rootPath.length > 1) {
|
|
101
|
-
const pkg = (0, import_path.join)(rootPath, "package.json");
|
|
102
|
-
const hasPkg = (0, import_fs.existsSync)(pkg);
|
|
103
|
-
if (hasPkg) {
|
|
104
|
-
return rootPath;
|
|
105
|
-
} else {
|
|
106
|
-
rootPath = (0, import_path.join)(rootPath, "..");
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
throw new Error(`Couldn't find package.json in any path above: ${fullPath}`);
|
|
110
|
-
});
|
|
111
|
-
function isInComponentModule(fullPath) {
|
|
112
|
-
return componentsBaseDirs.some(
|
|
113
|
-
(componentDir) => fullPath.startsWith(componentDir)
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
const shouldExclude = (path2, projectRoot) => {
|
|
117
|
-
var _a2;
|
|
118
|
-
const res = (_a2 = tamaguiOptions.shouldExtract) == null ? void 0 : _a2.call(tamaguiOptions, path2, projectRoot);
|
|
119
|
-
if (typeof res === "boolean") {
|
|
120
|
-
return !res;
|
|
121
|
-
}
|
|
122
|
-
if (isInComponentModule(path2)) {
|
|
123
|
-
return false;
|
|
124
|
-
}
|
|
125
|
-
return (0, import_tamagui_loader.shouldExclude)(path2, projectRoot);
|
|
126
|
-
};
|
|
127
|
-
const rnw = tamaguiOptions.useReactNativeWebLite ? "react-native-web-lite" : "react-native-web";
|
|
128
|
-
const tamaguiAliases = Object.fromEntries(
|
|
129
|
-
safeResolves([
|
|
130
|
-
["@tamagui/core/reset.css", "@tamagui/core/reset.css"],
|
|
131
|
-
["@tamagui/core", "@tamagui/core"],
|
|
132
|
-
["@tamagui/web", "@tamagui/web"],
|
|
133
|
-
// web specific light react-native-svg, optional, can use svgs but had issues with compat
|
|
134
|
-
["react-native-svg", "@tamagui/react-native-svg"],
|
|
135
|
-
// fixes https://github.com/kentcdodds/mdx-bundler/issues/143
|
|
136
|
-
["react/jsx-runtime.js", "react/jsx-runtime"],
|
|
137
|
-
["react/jsx-runtime", "react/jsx-runtime"],
|
|
138
|
-
["react/jsx-dev-runtime.js", "react/jsx-dev-runtime"],
|
|
139
|
-
["react/jsx-dev-runtime", "react/jsx-dev-runtime"],
|
|
140
|
-
["react-native-reanimated", "react-native-reanimated"],
|
|
141
|
-
["react-native$", rnw],
|
|
142
|
-
["react-native-web$", rnw],
|
|
143
|
-
["@testing-library/react-native", "@tamagui/proxy-worm"],
|
|
144
|
-
["@gorhom/bottom-sheet$", "@gorhom/bottom-sheet"],
|
|
145
|
-
// fix reanimated 3
|
|
146
|
-
["react-native/Libraries/Renderer/shims/ReactFabric", "@tamagui/proxy-worm"],
|
|
147
|
-
...tamaguiOptions.aliasReactPackages ? [
|
|
148
|
-
["react", "react"],
|
|
149
|
-
["react-dom", "react-dom"]
|
|
150
|
-
] : []
|
|
151
|
-
])
|
|
152
|
-
);
|
|
153
|
-
const alias = {
|
|
154
|
-
...webpackConfig.resolve.alias || {},
|
|
155
|
-
...tamaguiAliases
|
|
156
|
-
};
|
|
157
|
-
if (process.env.DEBUG) {
|
|
158
|
-
console.log("Tamagui alias:", alias);
|
|
159
|
-
}
|
|
160
|
-
if (process.env.ANALYZE === "true") {
|
|
161
|
-
Object.assign(webpackConfig.optimization, {
|
|
162
|
-
concatenateModules: false
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
webpackConfig.resolve.alias = alias;
|
|
166
|
-
webpackConfig.plugins.push(
|
|
167
|
-
new import_webpack.default.DefinePlugin({
|
|
168
|
-
"process.env.IS_STATIC": '""',
|
|
169
|
-
"process.env.TAMAGUI_TARGET": '"web"',
|
|
170
|
-
__DEV__: JSON.stringify(dev)
|
|
171
|
-
})
|
|
172
|
-
);
|
|
173
|
-
const excludeExports = tamaguiOptions.excludeReactNativeWebExports;
|
|
174
|
-
if (Array.isArray(excludeExports)) {
|
|
175
|
-
try {
|
|
176
|
-
const regexStr = `react-native-web(-lite)?/.*(${excludeExports.join(
|
|
177
|
-
"|"
|
|
178
|
-
)}).*js`;
|
|
179
|
-
const regex = new RegExp(regexStr);
|
|
180
|
-
webpackConfig.plugins.push(
|
|
181
|
-
new import_webpack.default.NormalModuleReplacementPlugin(
|
|
182
|
-
regex,
|
|
183
|
-
resolveEsm("@tamagui/proxy-worm")
|
|
184
|
-
)
|
|
185
|
-
);
|
|
186
|
-
} catch (err) {
|
|
187
|
-
console.warn(
|
|
188
|
-
`Invalid names provided to excludeReactNativeWebExports: ${excludeExports.join(
|
|
189
|
-
", "
|
|
190
|
-
)}`
|
|
191
|
-
);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
if (process.env.IGNORE_TS_CONFIG_PATHS) {
|
|
195
|
-
if (process.env.DEBUG) {
|
|
196
|
-
console.log(prefix, "ignoring tsconfig paths");
|
|
197
|
-
}
|
|
198
|
-
if (webpackConfig.resolve.plugins[0]) {
|
|
199
|
-
delete webpackConfig.resolve.plugins[0].paths["@tamagui/*"];
|
|
200
|
-
delete webpackConfig.resolve.plugins[0].paths["tamagui"];
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
if (!isServer) {
|
|
204
|
-
nextConfig.modularizeImports ?? (nextConfig.modularizeImports = {});
|
|
205
|
-
nextConfig.modularizeImports["@tamagui/lucide-icons"] = {
|
|
206
|
-
transform: `@tamagui/lucide-icons/dist/esm/icons/{{kebabCase member}}`,
|
|
207
|
-
skipDefaultConversion: true
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
if (isServer) {
|
|
211
|
-
const externalize = (context, request) => {
|
|
212
|
-
const fullPath = request[0] === "." ? import_path.default.join(context, request) : request;
|
|
213
|
-
if (tamaguiOptions.shouldExcludeFromServer) {
|
|
214
|
-
const userRes = tamaguiOptions.shouldExcludeFromServer({
|
|
215
|
-
context,
|
|
216
|
-
request,
|
|
217
|
-
fullPath
|
|
218
|
-
});
|
|
219
|
-
if (userRes !== void 0) {
|
|
220
|
-
return userRes;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
if (isInComponentModule(fullPath)) {
|
|
224
|
-
return false;
|
|
225
|
-
}
|
|
226
|
-
if (fullPath.includes("react-native-web")) {
|
|
227
|
-
return false;
|
|
228
|
-
}
|
|
229
|
-
if (fullPath === "react-native" || fullPath.startsWith(`react-native${SEP}`)) {
|
|
230
|
-
return false;
|
|
231
|
-
}
|
|
232
|
-
if (
|
|
233
|
-
// feather icons uses react-native-svg which needs to be aliased
|
|
234
|
-
// fullPath.includes('/lucide-icons/') ||
|
|
235
|
-
fullPath.startsWith("react-native-web") || fullPath.includes(`node_modules${SEP}react-native-web`) || new RegExp(`^(react-dom|react)${SEP}$`).test(fullPath)
|
|
236
|
-
) {
|
|
237
|
-
return `commonjs ${fullPath}`;
|
|
238
|
-
}
|
|
239
|
-
if (fullPath.startsWith("moti") || fullPath.startsWith("solito") || fullPath === "tamagui" || fullPath.startsWith("@tamagui") || fullPath === "react-native-safe-area-context" || fullPath === "expo-linear-gradient" || fullPath.startsWith("@react-navigation") || fullPath.startsWith("@gorhom")) {
|
|
240
|
-
return;
|
|
241
|
-
}
|
|
242
|
-
if (/^@?react-native-/.test(request)) {
|
|
243
|
-
return false;
|
|
244
|
-
}
|
|
245
|
-
return true;
|
|
246
|
-
};
|
|
247
|
-
webpackConfig.externals = [
|
|
248
|
-
...webpackConfig.externals.map((external) => {
|
|
249
|
-
if (typeof external !== "function") {
|
|
250
|
-
return external;
|
|
251
|
-
}
|
|
252
|
-
return (ctx, cb) => {
|
|
253
|
-
const isCb = typeof cb === "function";
|
|
254
|
-
const res = externalize(ctx.context, ctx.request);
|
|
255
|
-
if (isCb) {
|
|
256
|
-
if (typeof res === "string") {
|
|
257
|
-
return cb(null, res);
|
|
258
|
-
}
|
|
259
|
-
if (res) {
|
|
260
|
-
return external(ctx, cb);
|
|
261
|
-
}
|
|
262
|
-
return cb();
|
|
263
|
-
}
|
|
264
|
-
return !res ? Promise.resolve(void 0) : typeof res === "string" ? Promise.resolve(res) : external(ctx);
|
|
265
|
-
};
|
|
266
|
-
})
|
|
267
|
-
];
|
|
268
|
-
}
|
|
269
|
-
const cssRules = webpackConfig.module.rules.find(
|
|
270
|
-
(rule) => Array.isArray(rule.oneOf) && rule.oneOf.some(
|
|
271
|
-
({ test }) => typeof test === "object" && typeof test.test === "function" && test.test("filename.css")
|
|
272
|
-
)
|
|
273
|
-
).oneOf;
|
|
274
|
-
if (cssRules) {
|
|
275
|
-
if (!tamaguiOptions.disableFontSupport) {
|
|
276
|
-
cssRules.unshift({
|
|
277
|
-
test: /\.(woff(2)?|eot|ttf|otf)(\?v=\d+\.\d+\.\d+)?$/,
|
|
278
|
-
use: [
|
|
279
|
-
{
|
|
280
|
-
loader: require.resolve("url-loader"),
|
|
281
|
-
options: {
|
|
282
|
-
limit: nextConfig.inlineFontLimit || 1024,
|
|
283
|
-
fallback: require.resolve("file-loader"),
|
|
284
|
-
publicPath: `${nextConfig.assetPrefix || ""}/_next/static/chunks/fonts/`,
|
|
285
|
-
outputPath: `${isServer ? "../" : ""}static/chunks/fonts/`,
|
|
286
|
-
name: "[name].[ext]"
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
]
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
const cssLoader = (0, import_loaders.getGlobalCssLoader)(
|
|
293
|
-
// @ts-ignore
|
|
294
|
-
{
|
|
295
|
-
assetPrefix: options.config.assetPrefix || config.assetPrefix,
|
|
296
|
-
future: nextConfig.future,
|
|
297
|
-
experimental: nextConfig.experimental || {},
|
|
298
|
-
isEdgeRuntime: true,
|
|
299
|
-
isProduction: !dev,
|
|
300
|
-
targetWeb: true,
|
|
301
|
-
isClient: !isServer,
|
|
302
|
-
isServer,
|
|
303
|
-
isDevelopment: dev
|
|
304
|
-
},
|
|
305
|
-
// @ts-ignore
|
|
306
|
-
() => (0, import_css.lazyPostCSS)(dir, getSupportedBrowsers(dir, dev)),
|
|
307
|
-
[]
|
|
308
|
-
);
|
|
309
|
-
cssRules.unshift({
|
|
310
|
-
test: tamaguiOptions.includeCSSTest ?? /\.tamagui\.css$/,
|
|
311
|
-
sideEffects: true,
|
|
312
|
-
use: cssLoader
|
|
313
|
-
});
|
|
314
|
-
}
|
|
315
|
-
webpackConfig.plugins.push(
|
|
316
|
-
new import_tamagui_loader.TamaguiPlugin({
|
|
317
|
-
commonjs: isServer,
|
|
318
|
-
exclude: (path2) => {
|
|
319
|
-
const res = shouldExclude(path2, options.dir);
|
|
320
|
-
return res;
|
|
321
|
-
},
|
|
322
|
-
...tamaguiOptions
|
|
323
|
-
})
|
|
324
|
-
);
|
|
325
|
-
if (typeof nextConfig.webpack === "function") {
|
|
326
|
-
return nextConfig.webpack(webpackConfig, options);
|
|
327
|
-
}
|
|
328
|
-
return webpackConfig;
|
|
329
|
-
}
|
|
330
|
-
};
|
|
331
|
-
};
|
|
332
|
-
};
|
|
333
|
-
function getSupportedBrowsers(dir, isDevelopment) {
|
|
334
|
-
let browsers;
|
|
335
|
-
try {
|
|
336
|
-
browsers = import_browserslist.default.loadConfig({
|
|
337
|
-
path: dir,
|
|
338
|
-
env: isDevelopment ? "development" : "production"
|
|
339
|
-
});
|
|
340
|
-
} catch {
|
|
341
|
-
}
|
|
342
|
-
return browsers;
|
|
343
|
-
}
|
|
344
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
345
|
-
0 && (module.exports = {
|
|
346
|
-
withTamagui
|
|
347
|
-
});
|
|
1
|
+
"use strict";var M=Object.create;var g=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var V=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var H=(t,n)=>{for(var i in n)g(t,i,{get:n[i],enumerable:!0})},T=(t,n,i,m)=>{if(n&&typeof n=="object"||typeof n=="function")for(let u of U(n))!q.call(t,u)&&u!==i&&g(t,u,{get:()=>n[u],enumerable:!(m=k(n,u))||m.enumerable});return t};var f=(t,n,i)=>(i=t!=null?M(V(t)):{},T(n||!t||!t.__esModule?g(i,"default",{value:t,enumerable:!0}):i,t)),J=t=>T(g({},"__esModule",{value:!0}),t);var K={};H(K,{withTamagui:()=>Y});module.exports=J(K);var $=require("fs"),l=f(require("path")),W=f(require("browserslist")),A=f(require("esm-resolve")),D=require("next/dist/build/webpack/config/blocks/css"),N=require("next/dist/build/webpack/config/blocks/css/loaders"),v=require("tamagui-loader"),E=f(require("webpack"));const Y=t=>(n={})=>({...n,webpack:(i,m)=>{var R;const{dir:u,config:F,dev:p,isServer:d}=m,I=(0,A.default)((0,l.join)(u,"index.js"),{constraints:"node"});if(typeof globalThis.__DEV__>"u"&&(globalThis.__DEV__=p),!(typeof((R=m.config)==null?void 0:R.swcMinify)=="boolean"))throw new Error("Next.js 12 only supported");const j=`${d?" ssr ":" web "} |`,w=(r,o=!1)=>{var e;const s=[];for(const[a,c]of r){if(a.endsWith("$")){s.push([a,c]);continue}try{s.push([a,h(c)]),o&&s.push([a,h(c,!0)])}catch(B){if(a.includes("@gorhom/bottom-sheet"))continue;(e=process.env.DEBUG)!=null&&e.startsWith("tamagui")&&console.log(j,`withTamagui skipping resolving ${a}`,B)}}return s},h=(r,o=!1)=>{if(d||o)return require.resolve(r);const s=I(r);return s?l.default.join(u,s):require.resolve(r)},b=l.default.sep,G=w(t.components.map(r=>[r,r]),!0).map(([r,o])=>{let s=(0,l.dirname)(o);for(;s.length>1;){const e=(0,l.join)(s,"package.json");if((0,$.existsSync)(e))return s;s=(0,l.join)(s,"..")}throw new Error(`Couldn't find package.json in any path above: ${o}`)});function P(r){return G.some(o=>r.startsWith(o))}const L=(r,o)=>{var e;const s=(e=t.shouldExtract)==null?void 0:e.call(t,r,o);return typeof s=="boolean"?!s:P(r)?!1:(0,v.shouldExclude)(r,o)},S=t.useReactNativeWebLite?"react-native-web-lite":"react-native-web",z=Object.fromEntries(w([["@tamagui/core/reset.css","@tamagui/core/reset.css"],["@tamagui/core","@tamagui/core"],["@tamagui/web","@tamagui/web"],["react-native-svg","@tamagui/react-native-svg"],["react/jsx-runtime.js","react/jsx-runtime"],["react/jsx-runtime","react/jsx-runtime"],["react/jsx-dev-runtime.js","react/jsx-dev-runtime"],["react/jsx-dev-runtime","react/jsx-dev-runtime"],["react-native-reanimated","react-native-reanimated"],["react-native$",S],["react-native-web$",S],["@testing-library/react-native","@tamagui/proxy-worm"],["@gorhom/bottom-sheet$","@gorhom/bottom-sheet"],["react-native/Libraries/Renderer/shims/ReactFabric","@tamagui/proxy-worm"],...t.aliasReactPackages?[["react","react"],["react-dom","react-dom"]]:[]])),_={...i.resolve.alias||{},...z};process.env.DEBUG&&console.log("Tamagui alias:",_),process.env.ANALYZE==="true"&&Object.assign(i.optimization,{concatenateModules:!1}),i.resolve.alias=_,i.plugins.push(new E.default.DefinePlugin({"process.env.IS_STATIC":'""',"process.env.TAMAGUI_TARGET":'"web"',__DEV__:JSON.stringify(p)}));const x=t.excludeReactNativeWebExports;if(Array.isArray(x))try{const r=`react-native-web(-lite)?/.*(${x.join("|")}).*js`,o=new RegExp(r);i.plugins.push(new E.default.NormalModuleReplacementPlugin(o,h("@tamagui/proxy-worm")))}catch{console.warn(`Invalid names provided to excludeReactNativeWebExports: ${x.join(", ")}`)}if(process.env.IGNORE_TS_CONFIG_PATHS&&(process.env.DEBUG&&console.log(j,"ignoring tsconfig paths"),i.resolve.plugins[0]&&(delete i.resolve.plugins[0].paths["@tamagui/*"],delete i.resolve.plugins[0].paths.tamagui)),d||(n.modularizeImports??(n.modularizeImports={}),n.modularizeImports["@tamagui/lucide-icons"]={transform:"@tamagui/lucide-icons/dist/esm/icons/{{kebabCase member}}",skipDefaultConversion:!0}),d){const r=(o,s)=>{const e=s[0]==="."?l.default.join(o,s):s;if(t.shouldExcludeFromServer){const a=t.shouldExcludeFromServer({context:o,request:s,fullPath:e});if(a!==void 0)return a}if(P(e)||e.includes("react-native-web")||e==="react-native"||e.startsWith(`react-native${b}`))return!1;if(e.startsWith("react-native-web")||e.includes(`node_modules${b}react-native-web`)||new RegExp(`^(react-dom|react)${b}$`).test(e))return`commonjs ${e}`;if(!(e.startsWith("moti")||e.startsWith("solito")||e==="tamagui"||e.startsWith("@tamagui")||e==="react-native-safe-area-context"||e==="expo-linear-gradient"||e.startsWith("@react-navigation")||e.startsWith("@gorhom")))return!/^@?react-native-/.test(s)};i.externals=[...i.externals.map(o=>typeof o!="function"?o:(s,e)=>{const a=typeof e=="function",c=r(s.context,s.request);return a?typeof c=="string"?e(null,c):c?o(s,e):e():c?typeof c=="string"?Promise.resolve(c):o(s):Promise.resolve(void 0)})]}const y=i.module.rules.find(r=>Array.isArray(r.oneOf)&&r.oneOf.some(({test:o})=>typeof o=="object"&&typeof o.test=="function"&&o.test("filename.css"))).oneOf;if(y){t.disableFontSupport||y.unshift({test:/\.(woff(2)?|eot|ttf|otf)(\?v=\d+\.\d+\.\d+)?$/,use:[{loader:require.resolve("url-loader"),options:{limit:n.inlineFontLimit||1024,fallback:require.resolve("file-loader"),publicPath:`${n.assetPrefix||""}/_next/static/chunks/fonts/`,outputPath:`${d?"../":""}static/chunks/fonts/`,name:"[name].[ext]"}}]});const r=(0,N.getGlobalCssLoader)({assetPrefix:m.config.assetPrefix||F.assetPrefix,future:n.future,experimental:n.experimental||{},isEdgeRuntime:!0,isProduction:!p,targetWeb:!0,isClient:!d,isServer:d,isDevelopment:p},()=>(0,D.lazyPostCSS)(u,Z(u,p)),[]);y.unshift({test:t.includeCSSTest??/\.tamagui\.css$/,sideEffects:!0,use:r})}return i.plugins.push(new v.TamaguiPlugin({commonjs:d,exclude:r=>L(r,m.dir),...t})),typeof n.webpack=="function"?n.webpack(i,m):i}});function Z(t,n){let i;try{i=W.default.loadConfig({path:t,env:n?"development":"production"})}catch{}return i}0&&(module.exports={withTamagui});
|
|
348
2
|
//# sourceMappingURL=withTamagui.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/withTamagui.ts"],
|
|
4
4
|
"sourcesContent": ["import { existsSync } from 'fs'\nimport path, { dirname, join } from 'path'\n\nimport type { TamaguiOptions } from '@tamagui/static'\nimport browserslist from 'browserslist'\nimport buildResolver from 'esm-resolve'\nimport { lazyPostCSS } from 'next/dist/build/webpack/config/blocks/css'\nimport { getGlobalCssLoader } from 'next/dist/build/webpack/config/blocks/css/loaders'\nimport { TamaguiPlugin, shouldExclude as shouldExcludeDefault } from 'tamagui-loader'\nimport webpack from 'webpack'\n\nexport type WithTamaguiProps = TamaguiOptions & {\n useReactNativeWebLite: boolean\n disableFontSupport?: boolean\n aliasReactPackages?: boolean\n includeCSSTest?: RegExp | ((path: string) => boolean)\n shouldExtract?: (path: string, projectRoot: string) => boolean | undefined\n shouldExcludeFromServer?: (props: {\n context: string\n request: string\n fullPath: string\n }) => boolean | string | undefined\n}\n\nexport const withTamagui = (tamaguiOptions: WithTamaguiProps) => {\n return (nextConfig: any = {}) => {\n return {\n ...nextConfig,\n webpack: (webpackConfig: any, options: any) => {\n const { dir, config, dev, isServer } = options\n\n const resolver = buildResolver(join(dir, 'index.js'), {\n constraints: 'node',\n })\n\n // @ts-ignore\n if (typeof globalThis['__DEV__'] === 'undefined') {\n // @ts-ignore\n globalThis['__DEV__'] = dev\n }\n\n const isNext12 = typeof options.config?.swcMinify === 'boolean'\n if (!isNext12) {\n throw new Error(`Next.js 12 only supported`)\n }\n\n const prefix = `${isServer ? ' ssr ' : ' web '} |`\n\n const safeResolves = (resolves: [string, string][], multiple = false) => {\n const res: string[][] = []\n for (const [out, mod] of resolves) {\n if (out.endsWith('$')) {\n res.push([out, mod])\n continue\n }\n try {\n res.push([out, resolveEsm(mod)])\n if (multiple) {\n res.push([out, resolveEsm(mod, true)])\n }\n } catch (err) {\n if (out.includes(`@gorhom/bottom-sheet`)) {\n continue\n }\n if (process.env.DEBUG?.startsWith('tamagui')) {\n // eslint-disable-next-line no-console\n console.log(prefix, `withTamagui skipping resolving ${out}`, err)\n }\n }\n }\n return res\n }\n\n const resolveEsm = (relativePath: string, onlyRequire = false) => {\n if (isServer || onlyRequire) {\n return require.resolve(relativePath)\n }\n const esm = resolver(relativePath)\n return esm ? path.join(dir, esm) : require.resolve(relativePath)\n }\n\n const SEP = path.sep\n\n // automatically compile our given components\n const componentsFullPaths = safeResolves(\n tamaguiOptions.components.map(\n (moduleName) => [moduleName, moduleName] as [string, string]\n ),\n true\n )\n\n const componentsBaseDirs = componentsFullPaths.map(([_, fullPath]) => {\n let rootPath = dirname(fullPath as string)\n while (rootPath.length > 1) {\n const pkg = join(rootPath, 'package.json')\n const hasPkg = existsSync(pkg)\n if (hasPkg) {\n return rootPath\n } else {\n rootPath = join(rootPath, '..')\n }\n }\n throw new Error(`Couldn't find package.json in any path above: ${fullPath}`)\n })\n\n function isInComponentModule(fullPath: string) {\n return componentsBaseDirs.some((componentDir) =>\n fullPath.startsWith(componentDir)\n )\n }\n\n // allows configuration\n const shouldExclude = (path: string, projectRoot: string) => {\n const res = tamaguiOptions.shouldExtract?.(path, projectRoot)\n if (typeof res === 'boolean') {\n return !res\n }\n if (isInComponentModule(path)) {\n return false\n }\n return shouldExcludeDefault(path, projectRoot)\n }\n\n const rnw = tamaguiOptions.useReactNativeWebLite\n ? 'react-native-web-lite'\n : 'react-native-web'\n\n const tamaguiAliases = Object.fromEntries(\n safeResolves([\n ['@tamagui/core/reset.css', '@tamagui/core/reset.css'],\n ['@tamagui/core', '@tamagui/core'],\n ['@tamagui/web', '@tamagui/web'],\n // web specific light react-native-svg, optional, can use svgs but had issues with compat\n ['react-native-svg', '@tamagui/react-native-svg'],\n // fixes https://github.com/kentcdodds/mdx-bundler/issues/143\n ['react/jsx-runtime.js', 'react/jsx-runtime'],\n ['react/jsx-runtime', 'react/jsx-runtime'],\n ['react/jsx-dev-runtime.js', 'react/jsx-dev-runtime'],\n ['react/jsx-dev-runtime', 'react/jsx-dev-runtime'],\n ['react-native-reanimated', 'react-native-reanimated'],\n ['react-native$', rnw],\n ['react-native-web$', rnw],\n ['@testing-library/react-native', '@tamagui/proxy-worm'],\n ['@gorhom/bottom-sheet$', '@gorhom/bottom-sheet'],\n // fix reanimated 3\n ['react-native/Libraries/Renderer/shims/ReactFabric', '@tamagui/proxy-worm'],\n ...(tamaguiOptions.aliasReactPackages\n ? ([\n ['react', 'react'],\n ['react-dom', 'react-dom'],\n ] as any)\n : []),\n ])\n )\n\n const alias = {\n ...(webpackConfig.resolve.alias || {}),\n ...tamaguiAliases,\n }\n\n if (process.env.DEBUG) {\n // eslint-disable-next-line no-console\n console.log('Tamagui alias:', alias)\n }\n\n if (process.env.ANALYZE === 'true') {\n Object.assign(webpackConfig.optimization, {\n concatenateModules: false,\n })\n }\n\n webpackConfig.resolve.alias = alias\n\n webpackConfig.plugins.push(\n new webpack.DefinePlugin({\n 'process.env.IS_STATIC': '\"\"',\n 'process.env.TAMAGUI_TARGET': '\"web\"',\n __DEV__: JSON.stringify(dev),\n })\n )\n\n const excludeExports = tamaguiOptions.excludeReactNativeWebExports\n if (Array.isArray(excludeExports)) {\n try {\n const regexStr = `react-native-web(-lite)?/.*(${excludeExports.join(\n '|'\n )}).*js`\n const regex = new RegExp(regexStr)\n // console.log(prefix, 'exclude', regexStr)\n webpackConfig.plugins.push(\n new webpack.NormalModuleReplacementPlugin(\n regex,\n resolveEsm('@tamagui/proxy-worm')\n )\n )\n } catch (err) {\n // eslint-disable-next-line no-console\n console.warn(\n `Invalid names provided to excludeReactNativeWebExports: ${excludeExports.join(\n ', '\n )}`\n )\n }\n }\n\n if (process.env.IGNORE_TS_CONFIG_PATHS) {\n if (process.env.DEBUG) {\n // eslint-disable-next-line no-console\n console.log(prefix, 'ignoring tsconfig paths')\n }\n if (webpackConfig.resolve.plugins[0]) {\n delete webpackConfig.resolve.plugins[0].paths['@tamagui/*']\n delete webpackConfig.resolve.plugins[0].paths['tamagui']\n }\n }\n\n // better shaking for icons:\n if (!isServer) {\n nextConfig.modularizeImports ??= {}\n nextConfig.modularizeImports['@tamagui/lucide-icons'] = {\n transform: `@tamagui/lucide-icons/dist/esm/icons/{{kebabCase member}}`,\n skipDefaultConversion: true,\n }\n }\n\n /**\n * Server react-native compat\n */\n if (isServer) {\n const externalize = (context: string, request: string) => {\n const fullPath = request[0] === '.' ? path.join(context, request) : request\n\n if (tamaguiOptions.shouldExcludeFromServer) {\n const userRes = tamaguiOptions.shouldExcludeFromServer({\n context,\n request,\n fullPath,\n })\n if (userRes !== undefined) {\n return userRes\n }\n }\n\n if (isInComponentModule(fullPath)) {\n return false\n }\n\n if (fullPath.includes('react-native-web')) {\n // always inline react-native-web due to errors where next.js resolved the path to esm\n return false\n }\n\n // must inline react-native so we can alias to react-native-web\n if (\n fullPath === 'react-native' ||\n fullPath.startsWith(`react-native${SEP}`)\n ) {\n return false\n }\n\n if (\n // feather icons uses react-native-svg which needs to be aliased\n // fullPath.includes('/lucide-icons/') ||\n fullPath.startsWith('react-native-web') ||\n fullPath.includes(`node_modules${SEP}react-native-web`) ||\n new RegExp(`^(react-dom|react)${SEP}$`).test(fullPath)\n ) {\n return `commonjs ${fullPath}`\n }\n if (\n fullPath.startsWith('moti') ||\n fullPath.startsWith('solito') ||\n fullPath === 'tamagui' ||\n fullPath.startsWith('@tamagui') ||\n fullPath === 'react-native-safe-area-context' ||\n fullPath === 'expo-linear-gradient' ||\n fullPath.startsWith('@react-navigation') ||\n fullPath.startsWith('@gorhom')\n ) {\n return\n }\n if (/^@?react-native-/.test(request)) {\n return false\n }\n return true\n }\n\n // externalize react native things from bundle\n webpackConfig.externals = [\n ...webpackConfig.externals.map((external) => {\n if (typeof external !== 'function') {\n return external\n }\n // only runs on server\n return (ctx, cb) => {\n const isCb = typeof cb === 'function'\n const res = externalize(ctx.context, ctx.request)\n if (isCb) {\n if (typeof res === 'string') {\n return cb(null, res)\n }\n if (res) {\n return external(ctx, cb)\n }\n return cb()\n }\n return !res\n ? Promise.resolve(undefined)\n : typeof res === 'string'\n ? Promise.resolve(res)\n : external(ctx)\n }\n }),\n ]\n }\n\n /**\n * Non-server support\n */\n const cssRules = webpackConfig.module.rules.find(\n (rule) =>\n Array.isArray(rule.oneOf) &&\n rule.oneOf.some(\n ({ test }) =>\n typeof test === 'object' &&\n typeof test.test === 'function' &&\n test.test('filename.css')\n )\n ).oneOf\n\n /**\n * Font Support\n */\n if (cssRules) {\n if (!tamaguiOptions.disableFontSupport) {\n // fonts support\n cssRules.unshift({\n test: /\\.(woff(2)?|eot|ttf|otf)(\\?v=\\d+\\.\\d+\\.\\d+)?$/,\n use: [\n {\n loader: require.resolve('url-loader'),\n options: {\n limit: nextConfig.inlineFontLimit || 1024,\n fallback: require.resolve('file-loader'),\n publicPath: `${\n nextConfig.assetPrefix || ''\n }/_next/static/chunks/fonts/`,\n outputPath: `${isServer ? '../' : ''}static/chunks/fonts/`,\n name: '[name].[ext]',\n },\n },\n ],\n })\n }\n\n /**\n * CSS Support\n */\n const cssLoader = getGlobalCssLoader(\n // @ts-ignore\n {\n assetPrefix: options.config.assetPrefix || config.assetPrefix,\n future: nextConfig.future,\n experimental: nextConfig.experimental || {},\n isEdgeRuntime: true,\n isProduction: !dev,\n targetWeb: true,\n isClient: !isServer,\n isServer,\n isDevelopment: dev,\n },\n // @ts-ignore\n () => lazyPostCSS(dir, getSupportedBrowsers(dir, dev)),\n []\n )\n\n cssRules.unshift({\n test: tamaguiOptions.includeCSSTest ?? /\\.tamagui\\.css$/,\n sideEffects: true,\n use: cssLoader,\n })\n }\n\n webpackConfig.plugins.push(\n new TamaguiPlugin({\n commonjs: isServer,\n exclude: (path: string) => {\n const res = shouldExclude(path, options.dir)\n // console.log(`shouldExclude`, res, path)\n return res\n },\n ...tamaguiOptions,\n })\n )\n\n if (typeof nextConfig.webpack === 'function') {\n return nextConfig.webpack(webpackConfig, options)\n }\n\n return webpackConfig\n },\n }\n }\n}\n\nfunction getSupportedBrowsers(dir, isDevelopment) {\n let browsers\n try {\n browsers = browserslist.loadConfig({\n path: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C,EAAeC,CAAO,EAG3CD,CACT,CACF,GAIJ,SAASqD,EAAqBlD,EAAKmD,EAAe,CAChD,IAAIC,EACJ,GAAI,CACFA,EAAW,EAAAC,QAAa,WAAW,CACjC,KAAMrD,EACN,IAAKmD,EAAgB,cAAgB,YACvC,CAAC,CACH,MAAE,CAEF,CACA,OAAOC,CACT",
|
|
6
|
+
"names": ["withTamagui_exports", "__export", "withTamagui", "__toCommonJS", "import_fs", "import_path", "import_browserslist", "import_esm_resolve", "import_css", "import_loaders", "import_tamagui_loader", "import_webpack", "tamaguiOptions", "nextConfig", "webpackConfig", "options", "_a", "dir", "config", "dev", "isServer", "resolver", "buildResolver", "prefix", "safeResolves", "resolves", "multiple", "res", "out", "mod", "resolveEsm", "err", "relativePath", "onlyRequire", "esm", "path", "SEP", "componentsBaseDirs", "moduleName", "_", "fullPath", "rootPath", "pkg", "isInComponentModule", "componentDir", "shouldExclude", "projectRoot", "shouldExcludeDefault", "rnw", "tamaguiAliases", "alias", "webpack", "excludeExports", "regexStr", "regex", "externalize", "context", "request", "userRes", "external", "ctx", "cb", "isCb", "cssRules", "rule", "test", "cssLoader", "getSupportedBrowsers", "isDevelopment", "browsers", "browserslist"]
|
|
7
7
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export*from"./withTamagui";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
package/dist/esm/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export*from"./withTamagui";
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|