@tamagui/build 1.30.28 → 1.30.29

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.
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/build",
3
- "version": "1.30.28",
3
+ "version": "1.30.29",
4
4
  "bin": {
5
5
  "tamagui-build": "tamagui-build.js"
6
6
  },
package/tamagui-build.js CHANGED
@@ -8,6 +8,7 @@ const fg = require('fast-glob')
8
8
  const createExternalPlugin = require('./externalNodePlugin')
9
9
  const debounce = require('lodash.debounce')
10
10
  const { dirname } = require('path')
11
+ const { getTsconfig } = require('get-tsconfig')
11
12
 
12
13
  const jsOnly = !!process.env.JS_ONLY
13
14
  const skipJS = !!(process.env.SKIP_JS || false)
@@ -21,6 +22,9 @@ const shouldClean = !!process.argv.includes('clean')
21
22
  const shouldCleanBuildOnly = !!process.argv.includes('clean:build')
22
23
  const shouldWatch = process.argv.includes('--watch')
23
24
  const declarationToRoot = !!process.argv.includes('--declaration-root')
25
+ const ignoreBaseUrl = process.argv.includes('--ignore-base-url')
26
+ const baseUrlIndex = process.argv.indexOf('--base-url')
27
+ const baseUrl = baseUrlIndex > -1 ? process.argv[baseUrlIndex] : '.'
24
28
 
25
29
  const pkg = fs.readJSONSync('./package.json')
26
30
  let shouldSkipInitialTypes = !!process.env.SKIP_TYPES_INITIAL
@@ -127,7 +131,8 @@ async function buildTsc() {
127
131
  await fs.ensureDir(targetDir)
128
132
 
129
133
  const declarationToRootFlag = declarationToRoot ? ' --declarationDir ./' : ''
130
- const cmd = `tsc --outDir ${targetDir} --rootDir src ${declarationToRootFlag}--emitDeclarationOnly --declarationMap`
134
+ const baseUrlFlag = ignoreBaseUrl ? '' : `--baseUrl ${baseUrl}`
135
+ const cmd = `tsc ${baseUrlFlag} --outDir ${targetDir} --rootDir src ${declarationToRootFlag}--emitDeclarationOnly --declarationMap`
131
136
 
132
137
  // console.log('\x1b[2m$', `npx ${cmd}`)
133
138
  await exec('npx', cmd.split(' '))