1.4.1 • Published 1 year ago

wext-manifest-webpack-plugin v1.4.1

Weekly downloads
229
License
MIT
Repository
github
Last release
1 year ago

❤️ it? ⭐️ it on GitHub or Tweet about it.

Table of Contents

How it works

It just find js files from manifest entry and remove the js file from the compilation.

Looking for Web Extension starter

Checkout web-extension-starter that uses this plugin

Installation

# npm
npm install --save-dev wext-manifest-webpack-plugin

# yarn
yarn add wext-manifest-webpack-plugin --dev

Version 1.4.0 adds support for webpack 5. Backward compatible with webpack 4 as well.

Usage

// ... other plugins
const WextManifestWebpackPlugin = require("wext-manifest-webpack-plugin");

module.exports = {
    entry: {
        manifest: './source/manifest.json',
        // ...
    },

    output: {
        path: path.join(destPath, targetBrowser),
        filename: 'js/[name].js',
    },

    module: {
        rules: [
            {
                type: 'javascript/auto', // prevent webpack handling json with its own loaders,
                test: /manifest\.json$/,
                use: 'wext-manifest-loader',
                exclude: /node_modules/,
            },
        ]
    },

    plugins: [
        new WextManifestWebpackPlugin(),
        // ...
    ],
};

Issues

Looking to contribute? Look for the Good First Issue label.

🐛 Bugs

Please file an issue here for bugs, missing documentation, or unexpected behavior.

See Bugs

Linting & TypeScript Config

License

MIT © Abhijith Vijayan

1.4.1

1 year ago

1.4.0

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago