Merge pull request #2761 from carocad/browser-support

Javascript: browser support increased with babel transformation
This commit is contained in:
Terence Parr 2020-02-25 09:35:36 -08:00 committed by GitHub
commit 225249fdae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1234 additions and 1 deletions

View File

@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env"]
}

File diff suppressed because it is too large Load Diff

View File

@ -17,6 +17,9 @@
},
"homepage": "https://github.com/antlr/antlr4",
"devDependencies": {
"@babel/core": "^7.8.4",
"@babel/preset-env": "^7.8.4",
"babel-loader": "^8.0.6",
"webpack": "^4.41.5",
"webpack-cli": "^3.3.10"
},

View File

@ -15,5 +15,14 @@ module.exports = {
net: "empty",
fs: "empty"
},
target: "web"
target: "web",
module: {
rules: [{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
}
}]
}
}