@startupjs/bundler 0.60.0-canary.2 → 0.60.0-canary.5
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/metro-config.js +12 -4
- package/package.json +3 -3
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))
|
|
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'))
|
|
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
|
|
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
|
|
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.
|
|
3
|
+
"version": "0.60.0-canary.5",
|
|
4
4
|
"description": "Opinionated scripts and configs to develop a react-native-web project",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@svgr/core": "^8.1.0",
|
|
25
25
|
"@svgr/plugin-jsx": "^8.1.0",
|
|
26
26
|
"@svgr/plugin-svgo": "^8.1.0",
|
|
27
|
-
"babel-preset-startupjs": "^0.60.0-canary.
|
|
27
|
+
"babel-preset-startupjs": "^0.60.0-canary.5",
|
|
28
28
|
"connect": "^3.7.0",
|
|
29
29
|
"lodash": "^4.17.20",
|
|
30
30
|
"remark-gfm": "^1.0.0"
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"cssxjs": "*",
|
|
34
34
|
"react-native-svg": "*"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "8ff5595765304c69e179acdfc8bb303e0d7f2ced"
|
|
37
37
|
}
|