@tamagui/next-plugin 1.88.22 → 1.88.23
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/esm/index.native.js
CHANGED
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
|
|
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
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
return to;
|
|
11
|
-
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
12
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
13
|
-
var src_exports = {};
|
|
14
|
-
module.exports = __toCommonJS(src_exports);
|
|
15
|
-
__reExport(src_exports, require("./withTamagui"), module.exports);
|
|
16
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
17
|
-
0 && (module.exports = {
|
|
18
|
-
...require("./withTamagui")
|
|
19
|
-
});
|
|
1
|
+
export * from "./withTamagui";
|
|
20
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,32 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
10
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
return to;
|
|
15
|
-
};
|
|
16
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
22
|
-
mod
|
|
23
|
-
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
24
|
-
var withTamagui_exports = {};
|
|
25
|
-
__export(withTamagui_exports, {
|
|
26
|
-
withTamagui: () => withTamagui
|
|
27
|
-
});
|
|
28
|
-
module.exports = __toCommonJS(withTamagui_exports);
|
|
29
|
-
var import_path = __toESM(require("path")), import_browserslist = __toESM(require("browserslist")), import_css = require("next/dist/build/webpack/config/blocks/css"), import_loaders = require("next/dist/build/webpack/config/blocks/css/loaders"), import_tamagui_loader = require("tamagui-loader"), import_webpack = __toESM(require("webpack"));
|
|
1
|
+
import path from "path";
|
|
2
|
+
import browserslist from "browserslist";
|
|
3
|
+
import { lazyPostCSS } from "next/dist/build/webpack/config/blocks/css";
|
|
4
|
+
import { getGlobalCssLoader } from "next/dist/build/webpack/config/blocks/css/loaders";
|
|
5
|
+
import { TamaguiPlugin } from "tamagui-loader";
|
|
6
|
+
import webpack from "webpack";
|
|
30
7
|
const withTamagui = (tamaguiOptions) => (nextConfig = {}) => {
|
|
31
8
|
var _a;
|
|
32
9
|
const isAppDir = (tamaguiOptions == null ? void 0 : tamaguiOptions.appDir) || ((_a = nextConfig.experimental) == null ? void 0 : _a.appDir);
|
|
@@ -41,11 +18,11 @@ const withTamagui = (tamaguiOptions) => (nextConfig = {}) => {
|
|
|
41
18
|
const { dir, config, dev, isServer } = options;
|
|
42
19
|
if (typeof globalThis.__DEV__ > "u" && (globalThis.__DEV__ = dev), !(typeof ((_a2 = options.config) == null ? void 0 : _a2.swcMinify) == "boolean"))
|
|
43
20
|
throw new Error("Next.js 12 only supported");
|
|
44
|
-
const prefix = `${isServer ? " ssr " : " web "} |`, SEP =
|
|
21
|
+
const prefix = `${isServer ? " ssr " : " web "} |`, SEP = path.sep;
|
|
45
22
|
process.env.ANALYZE === "true" && Object.assign(webpackConfig.optimization, {
|
|
46
23
|
concatenateModules: !1
|
|
47
24
|
});
|
|
48
|
-
const enableStudio = options.dev && options.nextRuntime === "nodejs" && isServer, tamaguiPlugin = new
|
|
25
|
+
const enableStudio = options.dev && options.nextRuntime === "nodejs" && isServer, tamaguiPlugin = new TamaguiPlugin({
|
|
49
26
|
enableStudio,
|
|
50
27
|
isServer,
|
|
51
28
|
...tamaguiOptions
|
|
@@ -65,12 +42,12 @@ const withTamagui = (tamaguiOptions) => (nextConfig = {}) => {
|
|
|
65
42
|
"process.env.TAMAGUI_INSERT_SELECTOR_TRIES": JSON.stringify("1")
|
|
66
43
|
}
|
|
67
44
|
};
|
|
68
|
-
if (webpackConfig.plugins.push(new
|
|
45
|
+
if (webpackConfig.plugins.push(new webpack.DefinePlugin(defines)), process.env.IGNORE_TS_CONFIG_PATHS && (process.env.DEBUG && console.info(prefix, "ignoring tsconfig paths"), webpackConfig.resolve.plugins[0] && (delete webpackConfig.resolve.plugins[0].paths["@tamagui/*"], delete webpackConfig.resolve.plugins[0].paths.tamagui)), isServer || (nextConfig.modularizeImports ?? (nextConfig.modularizeImports = {}), nextConfig.modularizeImports["@tamagui/lucide-icons"] = {
|
|
69
46
|
transform: "@tamagui/lucide-icons/dist/esm/icons/{{kebabCase member}}",
|
|
70
47
|
skipDefaultConversion: !0
|
|
71
48
|
}), isServer) {
|
|
72
49
|
const externalize = (context, request) => {
|
|
73
|
-
const fullPath = request[0] === "." ?
|
|
50
|
+
const fullPath = request[0] === "." ? path.join(context, request) : request;
|
|
74
51
|
if (tamaguiOptions.shouldExcludeFromServer) {
|
|
75
52
|
const userRes = tamaguiOptions.shouldExcludeFromServer({
|
|
76
53
|
context,
|
|
@@ -119,7 +96,7 @@ const withTamagui = (tamaguiOptions) => (nextConfig = {}) => {
|
|
|
119
96
|
}
|
|
120
97
|
]
|
|
121
98
|
});
|
|
122
|
-
const cssLoader =
|
|
99
|
+
const cssLoader = getGlobalCssLoader(
|
|
123
100
|
// @ts-ignore
|
|
124
101
|
{
|
|
125
102
|
assetPrefix: nextConfig.assetPrefix || options.config.assetPrefix || config.assetPrefix,
|
|
@@ -133,7 +110,7 @@ const withTamagui = (tamaguiOptions) => (nextConfig = {}) => {
|
|
|
133
110
|
isDevelopment: dev
|
|
134
111
|
},
|
|
135
112
|
// @ts-ignore
|
|
136
|
-
() =>
|
|
113
|
+
() => lazyPostCSS(dir, getSupportedBrowsers(dir, dev)),
|
|
137
114
|
[]
|
|
138
115
|
);
|
|
139
116
|
isAppDir || cssRules.unshift({
|
|
@@ -149,7 +126,7 @@ const withTamagui = (tamaguiOptions) => (nextConfig = {}) => {
|
|
|
149
126
|
function getSupportedBrowsers(dir, isDevelopment) {
|
|
150
127
|
let browsers;
|
|
151
128
|
try {
|
|
152
|
-
browsers =
|
|
129
|
+
browsers = browserslist.loadConfig({
|
|
153
130
|
path: dir,
|
|
154
131
|
env: isDevelopment ? "development" : "production"
|
|
155
132
|
});
|
|
@@ -157,8 +134,7 @@ function getSupportedBrowsers(dir, isDevelopment) {
|
|
|
157
134
|
}
|
|
158
135
|
return browsers;
|
|
159
136
|
}
|
|
160
|
-
|
|
161
|
-
0 && (module.exports = {
|
|
137
|
+
export {
|
|
162
138
|
withTamagui
|
|
163
|
-
}
|
|
139
|
+
};
|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C,MAAM;AAAA,cACR;AAAA,YACF;AAAA,UACF;AAAA,QACF,CAAC;AAMH,cAAM,YAAY;AAAA;AAAA,UAEhB;AAAA,YACE,aACE,WAAW,eACX,QAAQ,OAAO,eACf,OAAO;AAAA,YACT,QAAQ,WAAW;AAAA,YACnB,cAAc,WAAW,gBAAgB,CAAC;AAAA,YAC1C,eAAe;AAAA,YACf,cAAc,CAAC;AAAA,YACf,WAAW;AAAA,YACX,UAAU,CAAC;AAAA,YACX;AAAA,YACA,eAAe;AAAA,UACjB;AAAA;AAAA,UAEA,MAAM,YAAY,KAAK,qBAAqB,KAAK,GAAG,CAAC;AAAA,UACrD,CAAC;AAAA,QACH;AACA,QAAK,YACH,SAAS,QAAQ;AAAA,UACf,MAAM,eAAe,kBAAkB;AAAA,UACvC,aAAa;AAAA,UACb,KAAK;AAAA,QACP,CAAC;AAAA,MAEL;AAIA,aAFA,cAAc,QAAQ,KAAK,aAAa,GAEpC,OAAO,WAAW,WAAY,aACzB,WAAW,QAAQ,eAAe,OAAO,IAG3C;AAAA,IACT;AAAA,EACF;AACF;AAGF,SAAS,qBAAqB,KAAK,eAAe;AAChD,MAAI;AACJ,MAAI;AACF,eAAW,aAAa,WAAW;AAAA,MACjC,MAAM;AAAA,MACN,KAAK,gBAAgB,gBAAgB;AAAA,IACvC,CAAC;AAAA,EACH,QAAQ;AAAA,EAER;AACA,SAAO;AACT;",
|
|
5
|
+
"names": ["_a"]
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/next-plugin",
|
|
3
|
-
"version": "1.88.
|
|
3
|
+
"version": "1.88.23",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"types": "./types/index.d.ts",
|
|
@@ -21,21 +21,21 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@babel/preset-react": "^7.23.3",
|
|
24
|
-
"@tamagui/proxy-worm": "1.88.
|
|
25
|
-
"@tamagui/react-native-svg": "1.88.
|
|
26
|
-
"@tamagui/static": "1.88.
|
|
24
|
+
"@tamagui/proxy-worm": "1.88.23",
|
|
25
|
+
"@tamagui/react-native-svg": "1.88.23",
|
|
26
|
+
"@tamagui/static": "1.88.23",
|
|
27
27
|
"babel-loader": "^9.1.2",
|
|
28
28
|
"browserslist": "^4.22.2",
|
|
29
29
|
"css-loader": "^6.7.4",
|
|
30
30
|
"esbuild-loader": "^3.0.1",
|
|
31
31
|
"file-loader": "^6.2.0",
|
|
32
32
|
"html-webpack-plugin": "^5.5.0",
|
|
33
|
-
"tamagui-loader": "1.88.
|
|
33
|
+
"tamagui-loader": "1.88.23",
|
|
34
34
|
"thread-loader": "^4.0.1",
|
|
35
35
|
"url-loader": "^4.1.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@tamagui/build": "1.88.
|
|
38
|
+
"@tamagui/build": "1.88.23",
|
|
39
39
|
"next": "^14.0.4"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|