JavaScript.webpack.config.cjs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of antlr4-runtime-testsuite Show documentation
Show all versions of antlr4-runtime-testsuite Show documentation
A collection of tests for ANTLR 4 Runtime libraries.
const path = require('path');
const ESLintPlugin = require('eslint-webpack-plugin');
module.exports = {
mode: "production",
entry: './src/antlr4/index.js',
output: {
filename: 'antlr4.js',
path: path.resolve(__dirname, 'dist'),
// the name of the exported antlr4
library: "antlr4",
libraryTarget: 'window'
},
externals: {
module: "empty",
net: "empty",
fs: "empty"
},
target: "web",
module: {
rules: [{
test: /\.js$/,
exclude: /node_modules/,
use: [ 'babel-loader' ]
}]
},
performance: {
maxAssetSize: 512000,
maxEntrypointSize: 512000
},
plugins: [ new ESLintPlugin() ]
};