@s-ui/bundler 9.39.0-typescript.109 → 9.39.0-typescript.110

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@s-ui/bundler",
3
- "version": "9.39.0-typescript.109",
3
+ "version": "9.39.0-typescript.110",
4
4
  "description": "Config-free bundler for ES6 React apps.",
5
5
  "bin": {
6
6
  "sui-bundler": "./bin/sui-bundler.js"
@@ -17,9 +17,14 @@ const tsConfigTemplate = `\
17
17
 
18
18
  const md5 = str => crypto.createHash('md5').update(str).digest('hex')
19
19
  const TS_CONFIG_PATH = path.join(INIT_CWD, 'tsconfig.json')
20
+ const PACKAGE_JSON_CONFIG_PATH = path.join(INIT_CWD, 'package.json')
21
+
22
+ const config = require(PACKAGE_JSON_CONFIG_PATH)?.config?.['sui-bundler'] || {}
20
23
 
21
24
  const shouldGenerateTSConfig = () => {
22
25
  try {
26
+ if (!config?.type || config?.type !== 'typescript') return false
27
+
23
28
  if (!fs.existsSync(TS_CONFIG_PATH)) return true
24
29
 
25
30
  const tsConfigLocal = fs.readFileSync(TS_CONFIG_PATH, {encoding: 'utf8'})