Skip to content

Commit

Permalink
Use babel to transform JS
Browse files Browse the repository at this point in the history
After this, we can generally use most modern JS
without having to look at caniuse.com and see if
the feature is supported.

Ref #1373
  • Loading branch information
yuvipanda committed Sep 20, 2021
1 parent f9c2f61 commit 9951c81
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
3 changes: 3 additions & 0 deletions babel.config.json
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env"]
}
6 changes: 5 additions & 1 deletion package.json
Expand Up @@ -3,6 +3,10 @@
"version": "0.1.0",
"description": "`BinderHub`",
"devDependencies": {
"@babel/cli": "^7.15.7",
"@babel/core": "^7.15.5",
"@babel/preset-env": "^7.15.6",
"babel-loader": "^8.2.2",
"css-loader": "^6.2.0",
"eslint": "^7.32.0",
"mini-css-extract-plugin": "^2.3.0",
Expand All @@ -12,8 +16,8 @@
"dependencies": {
"bootstrap": "^3.4.0",
"clipboard": "^2.0.8",
"jquery": "^3.6.0",
"event-source-polyfill": "^1.0.25",
"jquery": "^3.6.0",
"xterm": "^4.14.1",
"xterm-addon-fit": "^0.5.0"
},
Expand Down
10 changes: 10 additions & 0 deletions webpack.config.js
Expand Up @@ -23,6 +23,16 @@ module.exports = {
],
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
}
}
},
{
test: /\.css$/i,
use: [
Expand Down

0 comments on commit 9951c81

Please sign in to comment.