@startupjs/bundler 0.60.0-canary.2 → 0.60.0-canary.4

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.
Files changed (2) hide show
  1. package/metro-config.js +12 -4
  2. package/package.json +2 -2
package/metro-config.js CHANGED
@@ -150,9 +150,15 @@ function getMonorepoRootPackageJson (projectRoot) {
150
150
 
151
151
  function _checkStartupjsBabel (projectRoot) {
152
152
  const babelConfigPath = join(projectRoot, 'babel.config.cjs')
153
- if (!existsSync(babelConfigPath)) throw Error(ERRORS.missingBabelConfig)
153
+ if (!existsSync(babelConfigPath)) {
154
+ console.error('ERROR:', ERRORS.missingBabelConfig)
155
+ throw Error(ERRORS.missingBabelConfig)
156
+ }
154
157
  const babelConfig = readFileSync(join(projectRoot, 'babel.config.cjs'), 'utf8')
155
- if (!babelConfig.includes('startupjs/babel')) throw Error(ERRORS.noStartupjsBabelPreset)
158
+ if (!babelConfig.includes('startupjs/babel')) {
159
+ console.error('ERROR:', ERRORS.noStartupjsBabelPreset)
160
+ throw Error(ERRORS.noStartupjsBabelPreset)
161
+ }
156
162
  }
157
163
 
158
164
  const ERRORS = {
@@ -161,14 +167,16 @@ const ERRORS = {
161
167
  Please create babel.config.cjs following the instructions from Expo (or pure React Native) documentation,
162
168
  and add 'startupjs/babel' as the LAST item in the 'presets' array.
163
169
 
164
- To ignore this error, you can pass the option 'checkStartupjsBabel: false'
170
+ To ignore this error (if you want to use a custom babel preset to transform startupjs code),
171
+ you can pass the option 'checkStartupjsBabel: false'
165
172
  when calling 'getDefaultConfig(projectRoot, options)' from 'metro.config.cjs'.
166
173
  `,
167
174
  noStartupjsBabelPreset: `
168
175
  Your babel.config.cjs is missing 'startupjs/babel' preset.
169
176
  Please add 'startupjs/babel' as the LAST item in the 'presets' array of your babel.config.cjs.
170
177
 
171
- To ignore this error, you can pass the option 'checkStartupjsBabel: false'
178
+ To ignore this error (if you want to use a custom babel preset to transform startupjs code),
179
+ you can pass the option 'checkStartupjsBabel: false'
172
180
  when calling 'getDefaultConfig(projectRoot, options)' from 'metro.config.cjs'.
173
181
  `
174
182
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startupjs/bundler",
3
- "version": "0.60.0-canary.2",
3
+ "version": "0.60.0-canary.4",
4
4
  "description": "Opinionated scripts and configs to develop a react-native-web project",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
@@ -33,5 +33,5 @@
33
33
  "cssxjs": "*",
34
34
  "react-native-svg": "*"
35
35
  },
36
- "gitHead": "cbea3f3fe0689dfca50dcf5ddf9ef67730a680e2"
36
+ "gitHead": "0df84565f3b2e659c625ba605e43d4420c6fe7e1"
37
37
  }