Skip to content
This repository was archived by the owner on Oct 21, 2025. It is now read-only.

Commit da788d7

Browse files
authored
fix: empty build due babel incorrect configuration (#341)
The PR #315 added @babel/core >= 7.*. upgrading/using babel v7 requires, making certian changes, e.g using @babel...etc. This lead to `npm run build` being interrupted/exited.without generating the /dist folder. Luckily, there is a pacakge to automate migration of config using `npx babel-upgrade --write`, followed by `npm install`, and few minor changes, the dist folder came to life again. This shall fixes this openedx/wg-build-test-release#166. and probably making this openedx/edx-platform#30309 unnecessary. Note: This change adds "^7.0.0-bridge.0" as devDep, this is needed because we have pacakges that uses Babel 6, which are jest and babel-jest. once we upgrade to babel-jest and jest >=24.*.* the pacakge shall be removed.
1 parent 66906f3 commit da788d7

File tree

8 files changed

+19859
-25386
lines changed

8 files changed

+19859
-25386
lines changed

.babelrc

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,32 @@
11
{
22
"presets": [
3-
["env", {
4-
"targets": {
5-
"browsers": ["last 2 versions", "ie 11"]
3+
[
4+
"@babel/preset-env",
5+
{
6+
"targets": {
7+
"browsers": [
8+
"last 2 versions",
9+
"ie 11"
10+
]
11+
}
612
}
7-
}],
8-
"babel-preset-react"
13+
],
14+
"@babel/preset-react"
915
],
1016
"plugins": [
11-
"transform-object-rest-spread",
12-
"transform-class-properties"
17+
"@babel/plugin-proposal-object-rest-spread",
18+
"@babel/plugin-proposal-class-properties"
1319
],
1420
"env": {
1521
"i18n": {
1622
"plugins": [
17-
["react-intl", {
18-
"messagesDir": "./temp/babel-plugin-react-intl",
19-
"enforceDescriptions": true
20-
}]
23+
[
24+
"react-intl",
25+
{
26+
"messagesDir": "./temp/babel-plugin-react-intl",
27+
"enforceDescriptions": true
28+
}
29+
]
2130
]
2231
}
2332
}

0 commit comments

Comments
 (0)