Neoclassical Philosophic Musings

    es3-compatible-webpack-plugin

    1.0.5 • Public • Published

    ES3-compatible-webpack-plugin

    npm javascript

    A Webpack plugin used for converting code to be ES3-compatible with less overheads. For instance, transform object members definitions with keyword into quotes wrapped string, or eliminate trailing commas in arrays or objects.

    var obj = { extends: 1 }; /** => var obj = { 'extends': 1 }; */
    obj.extends; /** => obj['extends'] */
     
    var arr = [1, 2,]; /** => var arr = [1, 2]; */
    var obj = {a: 1,}; /** => var obj = {a: 1}; */

    The first step before using this plugin is to install it:

    npm install --save-dev es3-compatible-webpack-plugin

    And then, setup it in your Webpack configuration:

    /** webpack.config.js */
    const ES3CompatibleWebpackPlugin = require('es3-compatible-webpack-plugin').default;
     
    module.exports = {
        /** ... */
        plugins: [
            new ES3CompatibleWebpackPlugin(),
        ],
    };

    ⛽️ How to contribute

    Have an idea? Found a bug? See how to contribute.

    📜 License

    MIT © aleen42

    Install

    npm i es3-compatible-webpack-plugin

    DownloadsWeekly Downloads

    11

    Version

    1.0.5

    License

    MIT

    Unpacked Size

    20.6 kB

    Total Files

    6

    Last publish

    Collaborators

    • aleen42