All Downloads are FREE. Search and download functionalities are using the official Maven repository.

JavaScript.webpack.config.cjs Maven / Gradle / Ivy

There is a newer version: 4.13.2
Show newest version
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() ]
};




© 2015 - 2024 Weber Informatics LLC | Privacy Policy