tamagui-loader 1.116.1 → 1.116.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.
- package/dist/cjs/TamaguiPlugin.js +197 -0
- package/dist/cjs/css.js +28 -0
- package/dist/cjs/index.js +24 -0
- package/dist/cjs/loader.js +92 -0
- package/dist/cjs/polyfills.js +4 -0
- package/dist/cjs/requireResolve.js +22 -0
- package/dist/cjs/shouldExclude.js +33 -0
- package/dist/cjs/test.js +25 -0
- package/package.json +6 -6
- /package/dist/cjs/{TamaguiPlugin.cjs.map → TamaguiPlugin.js.map} +0 -0
- /package/dist/cjs/{css.cjs.map → css.js.map} +0 -0
- /package/dist/cjs/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/{loader.cjs.map → loader.js.map} +0 -0
- /package/dist/cjs/{polyfills.cjs.map → polyfills.js.map} +0 -0
- /package/dist/cjs/{requireResolve.cjs.map → requireResolve.js.map} +0 -0
- /package/dist/cjs/{shouldExclude.cjs.map → shouldExclude.js.map} +0 -0
- /package/dist/cjs/{test.cjs.map → test.js.map} +0 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
+
mod
|
|
22
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
|
+
var TamaguiPlugin_exports = {};
|
|
24
|
+
__export(TamaguiPlugin_exports, {
|
|
25
|
+
TamaguiPlugin: () => TamaguiPlugin
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(TamaguiPlugin_exports);
|
|
28
|
+
var import_static = __toESM(require("@tamagui/static")), import_node_fs = require("node:fs"), import_node_path = require("node:path"), import_webpack = __toESM(require("webpack")), import_requireResolve = require("./requireResolve");
|
|
29
|
+
const { watchTamaguiConfig } = import_static.default;
|
|
30
|
+
class TamaguiPlugin {
|
|
31
|
+
constructor(options = {
|
|
32
|
+
platform: "web",
|
|
33
|
+
components: ["@tamagui/core"]
|
|
34
|
+
}) {
|
|
35
|
+
this.options = options;
|
|
36
|
+
}
|
|
37
|
+
pluginName = "TamaguiPlugin";
|
|
38
|
+
safeResolves = (resolves, multiple = !1) => {
|
|
39
|
+
const res = [];
|
|
40
|
+
for (const [out, mod] of resolves) {
|
|
41
|
+
if (out.endsWith("$")) {
|
|
42
|
+
res.push([out, mod]);
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
res.push([out, (0, import_requireResolve.requireResolve)(mod)]), multiple && res.push([out, (0, import_requireResolve.requireResolve)(mod)]);
|
|
47
|
+
} catch (err) {
|
|
48
|
+
if (out.includes("@gorhom/bottom-sheet"))
|
|
49
|
+
continue;
|
|
50
|
+
process.env.DEBUG?.startsWith("tamagui") && console.info(` withTamagui skipping resolving ${out}`, err);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return res;
|
|
54
|
+
};
|
|
55
|
+
get componentsFullPaths() {
|
|
56
|
+
return this.safeResolves(
|
|
57
|
+
this.options.components?.map(
|
|
58
|
+
(moduleName) => [moduleName, moduleName]
|
|
59
|
+
) || [],
|
|
60
|
+
!0
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
get componentsBaseDirs() {
|
|
64
|
+
return this.componentsFullPaths.map(([_, fullPath]) => {
|
|
65
|
+
let rootPath = (0, import_node_path.dirname)(fullPath);
|
|
66
|
+
for (; rootPath.length > 1; ) {
|
|
67
|
+
const pkg = (0, import_node_path.join)(rootPath, "package.json");
|
|
68
|
+
if ((0, import_node_fs.existsSync)(pkg))
|
|
69
|
+
return rootPath;
|
|
70
|
+
rootPath = (0, import_node_path.join)(rootPath, "..");
|
|
71
|
+
}
|
|
72
|
+
throw new Error(`Couldn't find package.json in any path above: ${fullPath}`);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
isInComponentModule = (fullPath) => this.componentsBaseDirs.some(
|
|
76
|
+
(componentDir) => fullPath.startsWith(componentDir)
|
|
77
|
+
);
|
|
78
|
+
get defaultAliases() {
|
|
79
|
+
return Object.fromEntries(
|
|
80
|
+
this.safeResolves([
|
|
81
|
+
["@tamagui/core/reset.css", "@tamagui/core/reset.css"],
|
|
82
|
+
["@tamagui/core", "@tamagui/core"],
|
|
83
|
+
["@tamagui/web", "@tamagui/web"],
|
|
84
|
+
// fixes https://github.com/kentcdodds/mdx-bundler/issues/143
|
|
85
|
+
["react/jsx-runtime.js", "react/jsx-runtime"],
|
|
86
|
+
["react/jsx-runtime", "react/jsx-runtime"],
|
|
87
|
+
["react/jsx-dev-runtime.js", "react/jsx-dev-runtime"],
|
|
88
|
+
["react/jsx-dev-runtime", "react/jsx-dev-runtime"],
|
|
89
|
+
...this.options.useTamaguiSVG ? [["react-native-svg", "@tamagui/react-native-svg"]] : [],
|
|
90
|
+
...this.options.useReactNativeWebLite ? [
|
|
91
|
+
["react-native$", "@tamagui/react-native-web-lite"],
|
|
92
|
+
["react-native-web$", "@tamagui/react-native-web-lite"]
|
|
93
|
+
] : [
|
|
94
|
+
["react-native$", "react-native-web"],
|
|
95
|
+
["react-native-web$", "react-native-web"]
|
|
96
|
+
]
|
|
97
|
+
])
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
apply(compiler) {
|
|
101
|
+
if (import_static.default.loadTamaguiSync(this.options), compiler.options.mode === "development" && !this.options.disableWatchConfig && watchTamaguiConfig(this.options).then((watcher) => {
|
|
102
|
+
process.once("exit", () => {
|
|
103
|
+
watcher?.dispose();
|
|
104
|
+
});
|
|
105
|
+
}), compiler.hooks.normalModuleFactory.tap(this.pluginName, (nmf) => {
|
|
106
|
+
nmf.hooks.createModule.tap(
|
|
107
|
+
this.pluginName,
|
|
108
|
+
// @ts-expect-error CreateData is typed as 'object'...
|
|
109
|
+
(createData) => {
|
|
110
|
+
createData.matchResource?.endsWith(".tamagui.css") && (createData.settings.sideEffects = !0);
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
}), !this.options.disableAliases) {
|
|
114
|
+
const existingAlias = compiler.options.resolve.alias;
|
|
115
|
+
Array.isArray(existingAlias) || typeof existingAlias == "object" && Object.assign(existingAlias, this.defaultAliases);
|
|
116
|
+
}
|
|
117
|
+
const excludeExports = this.options.excludeReactNativeWebExports;
|
|
118
|
+
if (excludeExports && Array.isArray(excludeExports))
|
|
119
|
+
try {
|
|
120
|
+
const regexStr = `react-native-web(-lite)?/.*(${excludeExports.join("|")}).*js`, regex = new RegExp(regexStr);
|
|
121
|
+
compiler.hooks.environment.tap("MyPlugin", () => {
|
|
122
|
+
new import_webpack.default.NormalModuleReplacementPlugin(
|
|
123
|
+
regex,
|
|
124
|
+
(0, import_requireResolve.requireResolve)("@tamagui/proxy-worm")
|
|
125
|
+
).apply(compiler);
|
|
126
|
+
});
|
|
127
|
+
} catch {
|
|
128
|
+
console.warn(
|
|
129
|
+
`Invalid names provided to excludeReactNativeWebExports: ${excludeExports.join(
|
|
130
|
+
", "
|
|
131
|
+
)}`
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
this.options.emitSingleCSSFile && (console.info(" \u27A1 [tamagui] \u{1F3A8} combining css into one file"), compiler.hooks.make.tap(this.pluginName, (compilation) => {
|
|
135
|
+
compilation.hooks.processAssets.tap(this.pluginName, (assets) => {
|
|
136
|
+
try {
|
|
137
|
+
const cssFiles = Object.keys(assets).filter((asset) => asset.endsWith(".css"));
|
|
138
|
+
if (cssFiles.length === 0)
|
|
139
|
+
return;
|
|
140
|
+
const combinedCSS = cssFiles.reduce((acc, file) => {
|
|
141
|
+
const cssContent = compilation.assets[file].source();
|
|
142
|
+
return `${acc}
|
|
143
|
+
${cssContent}`;
|
|
144
|
+
}, "");
|
|
145
|
+
for (const [index, cssFile] of cssFiles.entries())
|
|
146
|
+
index > 0 ? compilation.updateAsset(
|
|
147
|
+
cssFile,
|
|
148
|
+
new compiler.webpack.sources.RawSource("")
|
|
149
|
+
) : (console.info(` \u27A1 [tamagui] \u{1F3A8} emitting single css to ${cssFile}`), compilation.updateAsset(
|
|
150
|
+
cssFile,
|
|
151
|
+
new compiler.webpack.sources.RawSource(Buffer.from(combinedCSS))
|
|
152
|
+
));
|
|
153
|
+
} catch (error) {
|
|
154
|
+
compilation.errors.push(error);
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
})), compiler.options.resolve.extensions = [
|
|
158
|
+
.../* @__PURE__ */ new Set([
|
|
159
|
+
".web.tsx",
|
|
160
|
+
".web.ts",
|
|
161
|
+
".web.js",
|
|
162
|
+
".ts",
|
|
163
|
+
".tsx",
|
|
164
|
+
".js",
|
|
165
|
+
...compiler.options.resolve.extensions || []
|
|
166
|
+
])
|
|
167
|
+
], compiler.options.resolve.fallback ||= {}, compiler.options.resolve.fallback.crypto ||= !1;
|
|
168
|
+
const mainFields = compiler.options.resolve.mainFields;
|
|
169
|
+
if (mainFields && (compiler.options.resolve.mainFields = Array.isArray(mainFields) ? mainFields : [mainFields], this.options.disableModuleJSXEntry || mainFields.unshift("module:jsx")), !compiler.options.module)
|
|
170
|
+
return;
|
|
171
|
+
const { jsLoader } = this.options, existing = compiler.options.module.rules, rules = existing.find((x) => typeof x == "object" && "oneOf" in x ? x : null)?.oneOf ?? existing, tamaguiLoader = {
|
|
172
|
+
loader: (0, import_requireResolve.requireResolve)("tamagui-loader"),
|
|
173
|
+
options: {
|
|
174
|
+
...this.options,
|
|
175
|
+
_disableLoadTamagui: !0
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
let didReplaceNextJS = !1;
|
|
179
|
+
for (const [index, rule] of rules.entries())
|
|
180
|
+
(rule?.use?.loader === "next-swc-loader" || Array.isArray(rule?.use) && rule?.use[0].loader === "next-swc-loader") && !rule.issuerLayer && (didReplaceNextJS = !0, rules[index] = {
|
|
181
|
+
...rule,
|
|
182
|
+
test: this.options.test ?? rule.test ?? /\.m?[jt]sx?$/,
|
|
183
|
+
exclude: this.options.exclude ?? rule.exclude,
|
|
184
|
+
use: [
|
|
185
|
+
...jsLoader ? [jsLoader] : [],
|
|
186
|
+
...rule.use ? [].concat(rule.use) : [],
|
|
187
|
+
tamaguiLoader
|
|
188
|
+
]
|
|
189
|
+
});
|
|
190
|
+
didReplaceNextJS || compiler.options.mode === "development" && existing.push({
|
|
191
|
+
test: this.options.test ?? /\.tsx$/,
|
|
192
|
+
exclude: this.options.exclude,
|
|
193
|
+
use: [tamaguiLoader]
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=TamaguiPlugin.js.map
|
package/dist/cjs/css.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
+
var css_exports = {};
|
|
16
|
+
__export(css_exports, {
|
|
17
|
+
default: () => loader
|
|
18
|
+
});
|
|
19
|
+
module.exports = __toCommonJS(css_exports);
|
|
20
|
+
function loader() {
|
|
21
|
+
this.async();
|
|
22
|
+
const options = { ...this.getOptions() };
|
|
23
|
+
let out = Buffer.from(options.cssData, "base64").toString("utf-8");
|
|
24
|
+
if (out)
|
|
25
|
+
return this.callback(null, out || "");
|
|
26
|
+
this.callback({ message: "No CSS found", name: "missing_css" });
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=css.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
return to;
|
|
13
|
+
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
+
var src_exports = {};
|
|
16
|
+
__export(src_exports, {
|
|
17
|
+
default: () => src_default
|
|
18
|
+
});
|
|
19
|
+
module.exports = __toCommonJS(src_exports);
|
|
20
|
+
var import_polyfills = require("./polyfills"), import_loader = require("./loader");
|
|
21
|
+
__reExport(src_exports, require("./TamaguiPlugin"), module.exports);
|
|
22
|
+
__reExport(src_exports, require("./shouldExclude"), module.exports);
|
|
23
|
+
var src_default = import_loader.loader;
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
+
mod
|
|
22
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
|
+
var loader_exports = {};
|
|
24
|
+
__export(loader_exports, {
|
|
25
|
+
loader: () => loader
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(loader_exports);
|
|
28
|
+
var import_static = __toESM(require("@tamagui/static")), import_requireResolve = require("./requireResolve");
|
|
29
|
+
const { createExtractor, extractToClassNames, getPragmaOptions } = import_static.default;
|
|
30
|
+
Error.stackTraceLimit = Number.POSITIVE_INFINITY;
|
|
31
|
+
let CSS_LOADER_PATH = "";
|
|
32
|
+
try {
|
|
33
|
+
CSS_LOADER_PATH = (0, import_requireResolve.requireResolve)("./css.cjs");
|
|
34
|
+
} catch {
|
|
35
|
+
try {
|
|
36
|
+
CSS_LOADER_PATH = (0, import_requireResolve.requireResolve)("./css.esm");
|
|
37
|
+
} catch {
|
|
38
|
+
CSS_LOADER_PATH = (0, import_requireResolve.requireResolve)("./css.js");
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
Error.stackTraceLimit = Number.POSITIVE_INFINITY;
|
|
42
|
+
const extractor = createExtractor();
|
|
43
|
+
let index = 0;
|
|
44
|
+
process.env.TAMAGUI_TARGET = "web";
|
|
45
|
+
const loader = async function(sourceIn) {
|
|
46
|
+
this.cacheable(!0);
|
|
47
|
+
const callback = this.async(), sourcePath = `${this.resourcePath}`;
|
|
48
|
+
if (sourcePath.includes("node_modules") || sourcePath.includes("lucide-icons"))
|
|
49
|
+
return callback(null, sourceIn);
|
|
50
|
+
const source = sourceIn.toString();
|
|
51
|
+
try {
|
|
52
|
+
const options = {
|
|
53
|
+
// @ts-ignore
|
|
54
|
+
platform: "web",
|
|
55
|
+
...this.getOptions()
|
|
56
|
+
}, { shouldDisable, shouldPrintDebug } = getPragmaOptions({
|
|
57
|
+
source,
|
|
58
|
+
path: sourcePath
|
|
59
|
+
});
|
|
60
|
+
if (shouldPrintDebug === "verbose" && (console.warn(`
|
|
61
|
+
|
|
62
|
+
--- Incoming source ---
|
|
63
|
+
|
|
64
|
+
`), console.warn(source)), shouldDisable)
|
|
65
|
+
return shouldPrintDebug && console.info("Disabling on file via pragma"), callback(null, source);
|
|
66
|
+
const cssPath = `${sourcePath}.${index++}.tamagui.css`, extracted = await extractToClassNames({
|
|
67
|
+
extractor,
|
|
68
|
+
source,
|
|
69
|
+
sourcePath,
|
|
70
|
+
options,
|
|
71
|
+
shouldPrintDebug
|
|
72
|
+
});
|
|
73
|
+
if (!extracted)
|
|
74
|
+
return callback(null, source);
|
|
75
|
+
if (extracted.styles) {
|
|
76
|
+
const cssQuery = `cssData=${Buffer.from(extracted.styles).toString("base64")}`, remReq = this.remainingRequest, importPath = `${cssPath}!=!${CSS_LOADER_PATH}?${cssQuery}!${remReq}`;
|
|
77
|
+
extracted.js = `${extracted.js}
|
|
78
|
+
|
|
79
|
+
require(${JSON.stringify(importPath)})`;
|
|
80
|
+
}
|
|
81
|
+
callback(null, extracted.js, extracted.map);
|
|
82
|
+
} catch (err) {
|
|
83
|
+
const message = err instanceof Error ? `${err.message}
|
|
84
|
+
${err.stack}` : String(err);
|
|
85
|
+
console.error(`Tamagui Webpack Loader Error:
|
|
86
|
+
`, ` ${message}
|
|
87
|
+
`), message.includes("Cannot create proxy") && console.info(
|
|
88
|
+
"This is usually due to components not loading at build-time. Check for logs just below the line above:"
|
|
89
|
+
), callback(null, source);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
//# sourceMappingURL=loader.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
+
var requireResolve_exports = {};
|
|
16
|
+
__export(requireResolve_exports, {
|
|
17
|
+
requireResolve: () => requireResolve
|
|
18
|
+
});
|
|
19
|
+
module.exports = __toCommonJS(requireResolve_exports);
|
|
20
|
+
var import_node_module = require("node:module");
|
|
21
|
+
const import_meta = {}, requireResolve = "url" in import_meta ? (0, import_node_module.createRequire)(import_meta.url).resolve : require.resolve;
|
|
22
|
+
//# sourceMappingURL=requireResolve.js.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
+
mod
|
|
22
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
|
+
var shouldExclude_exports = {};
|
|
24
|
+
__export(shouldExclude_exports, {
|
|
25
|
+
shouldExclude: () => shouldExclude
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(shouldExclude_exports);
|
|
28
|
+
var import_node_path = __toESM(require("node:path"));
|
|
29
|
+
const shouldExclude = (filePath, projectRoot) => !(projectRoot && filePath.includes(projectRoot) && filePath.endsWith("sx") || isTamaguiDistJSX(filePath));
|
|
30
|
+
function isTamaguiDistJSX(filePath) {
|
|
31
|
+
return filePath.includes("/dist/jsx/".replace(/\//g, import_node_path.default.sep));
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=shouldExclude.js.map
|
package/dist/cjs/test.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
+
var test_exports = {};
|
|
16
|
+
__export(test_exports, {
|
|
17
|
+
default: () => loader
|
|
18
|
+
});
|
|
19
|
+
module.exports = __toCommonJS(test_exports);
|
|
20
|
+
async function loader(sourceIn) {
|
|
21
|
+
this.cacheable(!0);
|
|
22
|
+
const callback = this.async(), sourcePath = `${this.resourcePath}`;
|
|
23
|
+
return callback(null, sourceIn);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=test.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tamagui-loader",
|
|
3
|
-
"version": "1.116.
|
|
3
|
+
"version": "1.116.3",
|
|
4
4
|
"types": "./types/index.d.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@tamagui/cli-color": "1.116.
|
|
32
|
-
"@tamagui/core": "1.116.
|
|
33
|
-
"@tamagui/static": "1.116.
|
|
34
|
-
"@tamagui/web": "1.116.
|
|
31
|
+
"@tamagui/cli-color": "1.116.3",
|
|
32
|
+
"@tamagui/core": "1.116.3",
|
|
33
|
+
"@tamagui/static": "1.116.3",
|
|
34
|
+
"@tamagui/web": "1.116.3",
|
|
35
35
|
"esbuild-loader": "^4.2.2",
|
|
36
36
|
"esm-resolve": "^1.0.8",
|
|
37
37
|
"fs-extra": "^11.2.0",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"lodash": "^4.17.21"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@tamagui/build": "1.116.
|
|
42
|
+
"@tamagui/build": "1.116.3",
|
|
43
43
|
"prettyjson": "^1.2.5",
|
|
44
44
|
"webpack": "^5.88.2"
|
|
45
45
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|