tamagui-loader 1.0.0-alpha.40 → 1.0.0-alpha.44

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.
@@ -74,7 +74,7 @@ function loader(source) {
74
74
  if (!out) {
75
75
  console.warn(`no styles... ${stylesByFile.keys} ${sourcePath}`);
76
76
  }
77
- return callback(null, out);
77
+ return callback(null, out || "");
78
78
  }
79
79
  if (startsWithComment && (source.startsWith("// tamagui-ignore") || source.startsWith("//! tamagui-ignore"))) {
80
80
  return callback(null, source);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/loader.ts"],
4
- "sourcesContent": ["import {\n TamaguiOptions,\n createExtractor,\n extractToClassNames,\n patchReactNativeWeb,\n} from '@tamagui/static'\nimport { getOptions } from 'loader-utils'\n\nError.stackTraceLimit = Infinity\nconst extractor = createExtractor()\n\nconst stylesByFile = new Map<string, string>()\nconst stylePathToFilePath = new Map<string, string>()\n\nlet index = 0\nlet hasLogged = false\nlet hasPatched = false\n\nprocess.env.TAMAGUI_TARGET = 'web'\n\nexport function loader(this: any, source: string) {\n this.cacheable()\n const callback = this.async()\n\n if (!process.env.TAMAGUI_DISABLE_RNW_PATCH && !hasPatched) {\n patchReactNativeWeb()\n hasPatched = true\n }\n\n try {\n const threaded = this.emitFile === undefined\n const options: TamaguiOptions = { ...getOptions(this) }\n\n if (\n options.disableExtraction &&\n (options.disableDebugAttr || process.env.NODE_ENV !== 'development')\n ) {\n if (!hasLogged) {\n console.log('\uD83E\uDD5A Tamagui disableDebug & disableExtraction set, no parsing running')\n hasLogged = true\n }\n return callback(null, source)\n }\n\n const sourcePath = `${this.resourcePath}`\n const startsWithComment = source[0] === '/' && source[1] === '/'\n const shouldPrintDebug =\n (!!process.env.DEBUG &&\n (process.env.DEBUG_FILE ? sourcePath.includes(process.env.DEBUG_FILE) : true)) ||\n // supports esbuild style //! comments\n (startsWithComment && (source.startsWith('// debug') || source.startsWith('//! debug')))\n\n // if outputted css\n if (options.cssPath || options.cssData) {\n const out = options.cssData\n ? Buffer.from(options.cssData, 'base64').toString('utf-8')\n : stylesByFile.get(stylePathToFilePath.get(sourcePath) ?? sourcePath)\n if (!out) {\n console.warn(`no styles... ${stylesByFile.keys} ${sourcePath}`)\n }\n return callback(null, out)\n }\n\n // check if should ignore\n if (\n startsWithComment &&\n (source.startsWith('// tamagui-ignore') || source.startsWith('//! tamagui-ignore'))\n ) {\n return callback(null, source)\n }\n\n const cssPath = threaded ? `${sourcePath}.module.css` : `${sourcePath}.${index++}.module.css`\n const extracted = extractToClassNames({\n loader: this,\n extractor,\n source,\n threaded,\n sourcePath,\n cssPath,\n options,\n shouldPrintDebug,\n })\n\n if (!extracted) {\n return callback(null, source)\n }\n\n if (!threaded) {\n if (extracted.stylesPath) {\n stylePathToFilePath.set(extracted.stylesPath, sourcePath)\n }\n if (extracted.styles) {\n stylesByFile.set(sourcePath, extracted.styles)\n }\n }\n\n callback(null, extracted.js, extracted.map)\n } catch (err) {\n console.error('ERROR', err)\n return callback(null, source)\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,oBAKO;AACP,0BAA2B;AAE3B,MAAM,kBAAkB;AACxB,MAAM,YAAY;AAElB,MAAM,eAAe,oBAAI;AACzB,MAAM,sBAAsB,oBAAI;AAEhC,IAAI,QAAQ;AACZ,IAAI,YAAY;AAChB,IAAI,aAAa;AAEjB,QAAQ,IAAI,iBAAiB;AAEtB,gBAA2B,QAAgB;AAChD,OAAK;AACL,QAAM,WAAW,KAAK;AAEtB,MAAI,CAAC,QAAQ,IAAI,6BAA6B,CAAC,YAAY;AACzD;AACA,iBAAa;AAAA;AAGf,MAAI;AACF,UAAM,WAAW,KAAK,aAAa;AACnC,UAAM,UAA0B,mBAAK,oCAAW;AAEhD,QACE,QAAQ,qBACP,SAAQ,oBAAoB,QAAQ,IAAI,aAA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assNames,\n patchReactNativeWeb,\n} from '@tamagui/static'\nimport { getOptions } from 'loader-utils'\n\nError.stackTraceLimit = Infinity\nconst extractor = createExtractor()\n\nconst stylesByFile = new Map<string, string>()\nconst stylePathToFilePath = new Map<string, string>()\n\nlet index = 0\nlet hasLogged = false\nlet hasPatched = false\n\nprocess.env.TAMAGUI_TARGET = 'web'\n\nexport function loader(this: any, source: string) {\n this.cacheable()\n const callback = this.async()\n\n if (!process.env.TAMAGUI_DISABLE_RNW_PATCH && !hasPatched) {\n patchReactNativeWeb()\n hasPatched = true\n }\n\n try {\n const threaded = this.emitFile === undefined\n const options: TamaguiOptions = { ...getOptions(this) }\n\n if (\n options.disableExtraction &&\n (options.disableDebugAttr || process.env.NODE_ENV !== 'development')\n ) {\n if (!hasLogged) {\n console.log('\uD83E\uDD5A Tamagui disableDebug & disableExtraction set, no parsing running')\n hasLogged = true\n }\n return callback(null, source)\n }\n\n const sourcePath = `${this.resourcePath}`\n const startsWithComment = source[0] === '/' && source[1] === '/'\n const shouldPrintDebug =\n (!!process.env.DEBUG &&\n (process.env.DEBUG_FILE ? sourcePath.includes(process.env.DEBUG_FILE) : true)) ||\n // supports esbuild style //! comments\n (startsWithComment && (source.startsWith('// debug') || source.startsWith('//! debug')))\n\n // if outputted css\n if (options.cssPath || options.cssData) {\n const out = options.cssData\n ? Buffer.from(options.cssData, 'base64').toString('utf-8')\n : stylesByFile.get(stylePathToFilePath.get(sourcePath) ?? sourcePath)\n if (!out) {\n console.warn(`no styles... ${stylesByFile.keys} ${sourcePath}`)\n }\n return callback(null, out || '')\n }\n\n // check if should ignore\n if (\n startsWithComment &&\n (source.startsWith('// tamagui-ignore') || source.startsWith('//! tamagui-ignore'))\n ) {\n return callback(null, source)\n }\n\n const cssPath = threaded ? `${sourcePath}.module.css` : `${sourcePath}.${index++}.module.css`\n const extracted = extractToClassNames({\n loader: this,\n extractor,\n source,\n threaded,\n sourcePath,\n cssPath,\n options,\n shouldPrintDebug,\n })\n\n if (!extracted) {\n return callback(null, source)\n }\n\n if (!threaded) {\n if (extracted.stylesPath) {\n stylePathToFilePath.set(extracted.stylesPath, sourcePath)\n }\n if (extracted.styles) {\n stylesByFile.set(sourcePath, extracted.styles)\n }\n }\n\n callback(null, extracted.js, extracted.map)\n } catch (err) {\n console.error('ERROR', err)\n return callback(null, source)\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,oBAKO;AACP,0BAA2B;AAE3B,MAAM,kBAAkB;AACxB,MAAM,YAAY;AAElB,MAAM,eAAe,oBAAI;AACzB,MAAM,sBAAsB,oBAAI;AAEhC,IAAI,QAAQ;AACZ,IAAI,YAAY;AAChB,IAAI,aAAa;AAEjB,QAAQ,IAAI,iBAAiB;AAEtB,gBAA2B,QAAgB;AAChD,OAAK;AACL,QAAM,WAAW,KAAK;AAEtB,MAAI,CAAC,QAAQ,IAAI,6BAA6B,CAAC,YAAY;AACzD;AACA,iBAAa;AAAA;AAGf,MAAI;AACF,UAAM,WAAW,KAAK,aAAa;AACnC,UAAM,UAA0B,mBAAK,oCAAW;AAEhD,QACE,QAAQ,qBACP,SAAQ,oBAAoB,QAAQ,IAAI,aAAa,gBACtD;AACA,UAAI,CAAC,WAAW;AACd,gBAAQ,IAAI;AACZ,oBAAY;AAAA;AAEd,aAAO,SAAS,MAAM;AAAA;AAGxB,UAAM,aAAa,GAAG,KAAK;AAC3B,UAAM,oBAAoB,OAAO,OAAO,OAAO,OAAO,OAAO;AAC7D,UAAM,mBACH,CAAC,CAAC,QAAQ,IAAI,SACZ,SAAQ,IAAI,aAAa,WAAW,SAAS,QAAQ,IAAI,cAAc,SAEzE,qBAAsB,QAAO,WAAW,eAAe,OAAO,WAAW;AAG5E,QAAI,QAAQ,WAAW,QAAQ,SAAS;AACtC,YAAM,MAAM,QAAQ,UAChB,OAAO,KAAK,QAAQ,SAAS,UAAU,SAAS,WAChD,aAAa,IAAI,oBAAoB,IAAI,eAAe;AAC5D,UAAI,CAAC,KAAK;AACR,gBAAQ,KAAK,gBAAgB,aAAa,QAAQ;AAAA;AAEpD,aAAO,SAAS,MAAM,OAAO;AAAA;AAI/B,QACE,qBACC,QAAO,WAAW,wBAAwB,OAAO,WAAW,wBAC7D;AACA,aAAO,SAAS,MAAM;AAAA;AAGxB,UAAM,UAAU,WAAW,GAAG,0BAA0B,GAAG,cAAc;AACzE,UAAM,YAAY,uCAAoB;AAAA,MACpC,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAGF,QAAI,CAAC,WAAW;AACd,aAAO,SAAS,MAAM;AAAA;AAGxB,QAAI,CAAC,UAAU;AACb,UAAI,UAAU,YAAY;AACxB,4BAAoB,IAAI,UAAU,YAAY;AAAA;AAEhD,UAAI,UAAU,QAAQ;AACpB,qBAAa,IAAI,YAAY,UAAU;AAAA;AAAA;AAI3C,aAAS,MAAM,UAAU,IAAI,UAAU;AAAA,WAChC,KAAP;AACA,YAAQ,MAAM,SAAS;AACvB,WAAO,SAAS,MAAM;AAAA;AAAA;AA/EV;",
6
6
  "names": []
7
7
  }
@@ -40,7 +40,7 @@ function loader(source) {
40
40
  if (!out) {
41
41
  console.warn(`no styles... ${stylesByFile.keys} ${sourcePath}`);
42
42
  }
43
- return callback(null, out);
43
+ return callback(null, out || "");
44
44
  }
45
45
  if (startsWithComment && (source.startsWith("// tamagui-ignore") || source.startsWith("//! tamagui-ignore"))) {
46
46
  return callback(null, source);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/loader.ts"],
4
- "sourcesContent": ["import {\n TamaguiOptions,\n createExtractor,\n extractToClassNames,\n patchReactNativeWeb,\n} from '@tamagui/static'\nimport { getOptions } from 'loader-utils'\n\nError.stackTraceLimit = Infinity\nconst extractor = createExtractor()\n\nconst stylesByFile = new Map<string, string>()\nconst stylePathToFilePath = new Map<string, string>()\n\nlet index = 0\nlet hasLogged = false\nlet hasPatched = false\n\nprocess.env.TAMAGUI_TARGET = 'web'\n\nexport function loader(this: any, source: string) {\n this.cacheable()\n const callback = this.async()\n\n if (!process.env.TAMAGUI_DISABLE_RNW_PATCH && !hasPatched) {\n patchReactNativeWeb()\n hasPatched = true\n }\n\n try {\n const threaded = this.emitFile === undefined\n const options: TamaguiOptions = { ...getOptions(this) }\n\n if (\n options.disableExtraction &&\n (options.disableDebugAttr || process.env.NODE_ENV !== 'development')\n ) {\n if (!hasLogged) {\n console.log('\uD83E\uDD5A Tamagui disableDebug & disableExtraction set, no parsing running')\n hasLogged = true\n }\n return callback(null, source)\n }\n\n const sourcePath = `${this.resourcePath}`\n const startsWithComment = source[0] === '/' && source[1] === '/'\n const shouldPrintDebug =\n (!!process.env.DEBUG &&\n (process.env.DEBUG_FILE ? sourcePath.includes(process.env.DEBUG_FILE) : true)) ||\n // supports esbuild style //! comments\n (startsWithComment && (source.startsWith('// debug') || source.startsWith('//! debug')))\n\n // if outputted css\n if (options.cssPath || options.cssData) {\n const out = options.cssData\n ? Buffer.from(options.cssData, 'base64').toString('utf-8')\n : stylesByFile.get(stylePathToFilePath.get(sourcePath) ?? sourcePath)\n if (!out) {\n console.warn(`no styles... ${stylesByFile.keys} ${sourcePath}`)\n }\n return callback(null, out)\n }\n\n // check if should ignore\n if (\n startsWithComment &&\n (source.startsWith('// tamagui-ignore') || source.startsWith('//! tamagui-ignore'))\n ) {\n return callback(null, source)\n }\n\n const cssPath = threaded ? `${sourcePath}.module.css` : `${sourcePath}.${index++}.module.css`\n const extracted = extractToClassNames({\n loader: this,\n extractor,\n source,\n threaded,\n sourcePath,\n cssPath,\n options,\n shouldPrintDebug,\n })\n\n if (!extracted) {\n return callback(null, source)\n }\n\n if (!threaded) {\n if (extracted.stylesPath) {\n stylePathToFilePath.set(extracted.stylesPath, sourcePath)\n }\n if (extracted.styles) {\n stylesByFile.set(sourcePath, extracted.styles)\n }\n }\n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O,SAAS,MAAM;AAAA;AAGxB,UAAM,UAAU,WAAW,GAAG,0BAA0B,GAAG,cAAc;AACzE,UAAM,YAAY,oBAAoB;AAAA,MACpC,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAGF,QAAI,CAAC,WAAW;AACd,aAAO,SAAS,MAAM;AAAA;AAGxB,QAAI,CAAC,UAAU;AACb,UAAI,UAAU,YAAY;AACxB,4BAAoB,IAAI,UAAU,YAAY;AAAA;AAEhD,UAAI,UAAU,QAAQ;AACpB,qBAAa,IAAI,YAAY,UAAU;AAAA;AAAA;AAI3C,aAAS,MAAM,UAAU,IAAI,UAAU;AAAA,WAChC,KAAP;AACA,YAAQ,MAAM,SAAS;AACvB,WAAO,SAAS,MAAM;AAAA;AAAA;AA/EV;",
4
+ "sourcesContent": ["import {\n TamaguiOptions,\n createExtractor,\n extractToClassNames,\n patchReactNativeWeb,\n} from '@tamagui/static'\nimport { getOptions } from 'loader-utils'\n\nError.stackTraceLimit = Infinity\nconst extractor = createExtractor()\n\nconst stylesByFile = new Map<string, string>()\nconst stylePathToFilePath = new Map<string, string>()\n\nlet index = 0\nlet hasLogged = false\nlet hasPatched = false\n\nprocess.env.TAMAGUI_TARGET = 'web'\n\nexport function loader(this: any, source: string) {\n this.cacheable()\n const callback = this.async()\n\n if (!process.env.TAMAGUI_DISABLE_RNW_PATCH && !hasPatched) {\n patchReactNativeWeb()\n hasPatched = true\n }\n\n try {\n const threaded = this.emitFile === undefined\n const options: TamaguiOptions = { ...getOptions(this) }\n\n if (\n options.disableExtraction &&\n (options.disableDebugAttr || process.env.NODE_ENV !== 'development')\n ) {\n if (!hasLogged) {\n console.log('\uD83E\uDD5A Tamagui disableDebug & disableExtraction set, no parsing running')\n hasLogged = true\n }\n return callback(null, source)\n }\n\n const sourcePath = `${this.resourcePath}`\n const startsWithComment = source[0] === '/' && source[1] === '/'\n const shouldPrintDebug =\n (!!process.env.DEBUG &&\n (process.env.DEBUG_FILE ? sourcePath.includes(process.env.DEBUG_FILE) : true)) ||\n // supports esbuild style //! comments\n (startsWithComment && (source.startsWith('// debug') || source.startsWith('//! debug')))\n\n // if outputted css\n if (options.cssPath || options.cssData) {\n const out = options.cssData\n ? Buffer.from(options.cssData, 'base64').toString('utf-8')\n : stylesByFile.get(stylePathToFilePath.get(sourcePath) ?? sourcePath)\n if (!out) {\n console.warn(`no styles... ${stylesByFile.keys} ${sourcePath}`)\n }\n return callback(null, out || '')\n }\n\n // check if should ignore\n if (\n startsWithComment &&\n (source.startsWith('// tamagui-ignore') || source.startsWith('//! tamagui-ignore'))\n ) {\n return callback(null, source)\n }\n\n const cssPath = threaded ? `${sourcePath}.module.css` : `${sourcePath}.${index++}.module.css`\n const extracted = extractToClassNames({\n loader: this,\n extractor,\n source,\n threaded,\n sourcePath,\n cssPath,\n options,\n shouldPrintDebug,\n })\n\n if (!extracted) {\n return callback(null, source)\n }\n\n if (!threaded) {\n if (extracted.stylesPath) {\n stylePathToFilePath.set(extracted.stylesPath, sourcePath)\n }\n if (extracted.styles) {\n stylesByFile.set(sourcePath, extracted.styles)\n }\n }\n\n callback(null, extracted.js, extracted.map)\n } catch (err) {\n console.error('ERROR', err)\n return callback(null, source)\n }\n}\n"],
5
+ "mappings": ";;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA;AAEA,MAAM,kBAAkB;AACxB,MAAM,YAAY;AAElB,MAAM,eAAe,oBAAI;AACzB,MAAM,sBAAsB,oBAAI;AAEhC,IAAI,QAAQ;AACZ,IAAI,YAAY;AAChB,IAAI,aAAa;AAEjB,QAAQ,IAAI,iBAAiB;AAEtB,gBAA2B,QAAgB;AApBlD;AAqBE,OAAK;AACL,QAAM,WAAW,KAAK;AAEtB,MAAI,CAAC,QAAQ,IAAI,6BAA6B,CAAC,YAAY;AACzD;AACA,iBAAa;AAAA;AAGf,MAAI;AACF,UAAM,WAAW,KAAK,aAAa;AACnC,UAAM,UAA0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AAO,SAAS,MAAM;AAAA;AAAA;AA/EV;",
6
6
  "names": []
7
7
  }
@@ -40,7 +40,7 @@ function loader(source) {
40
40
  if (!out) {
41
41
  console.warn(`no styles... ${stylesByFile.keys} ${sourcePath}`);
42
42
  }
43
- return callback(null, out);
43
+ return callback(null, out || "");
44
44
  }
45
45
  if (startsWithComment && (source.startsWith("// tamagui-ignore") || source.startsWith("//! tamagui-ignore"))) {
46
46
  return callback(null, source);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tamagui-loader",
3
- "version": "1.0.0-alpha.40",
3
+ "version": "1.0.0-alpha.44",
4
4
  "typings": "types",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -14,16 +14,16 @@
14
14
  "watch": "tamagui-build --watch"
15
15
  },
16
16
  "dependencies": {
17
- "@tamagui/static": "^1.0.0-alpha.40",
17
+ "@tamagui/static": "^1.0.0-alpha.44",
18
18
  "fs-extra": "^9.1.0",
19
19
  "loader-utils": "^2.0.0",
20
20
  "lodash": "^4.17.21"
21
21
  },
22
22
  "devDependencies": {
23
- "@tamagui/build": "^1.0.0-alpha.40"
23
+ "@tamagui/build": "^1.0.0-alpha.44"
24
24
  },
25
25
  "publishConfig": {
26
26
  "access": "public"
27
27
  },
28
- "gitHead": "425b002aea52f714266c1ae6ddbef6ba62deafeb"
28
+ "gitHead": "f3c5beec81b8282476fe66259a646b799b484a16"
29
29
  }