Skip to content

Commit

Permalink
fix: empty build due babel incorrect configuration (#341)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ghassanmas authored May 13, 2022
1 parent 66906f3 commit da788d7
Show file tree
Hide file tree
Showing 8 changed files with 19,859 additions and 25,386 deletions.
31 changes: 20 additions & 11 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
{
"presets": [
["env", {
"targets": {
"browsers": ["last 2 versions", "ie 11"]
[
"@babel/preset-env",
{
"targets": {
"browsers": [
"last 2 versions",
"ie 11"
]
}
}
}],
"babel-preset-react"
],
"@babel/preset-react"
],
"plugins": [
"transform-object-rest-spread",
"transform-class-properties"
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-proposal-class-properties"
],
"env": {
"i18n": {
"plugins": [
["react-intl", {
"messagesDir": "./temp/babel-plugin-react-intl",
"enforceDescriptions": true
}]
[
"react-intl",
{
"messagesDir": "./temp/babel-plugin-react-intl",
"enforceDescriptions": true
}
]
]
}
}
Expand Down
Loading

0 comments on commit da788d7

Please sign in to comment.