@cnlabs/integrator-webpack-plugin

creates file widget.js containing browser js code to import js and css artifacts

Usage no npm install needed!

<script type="module">
  import cnlabsIntegratorWebpackPlugin from 'https://cdn.skypack.dev/@cnlabs/integrator-webpack-plugin';
</script>

README

Add dev dependency

yarn add --dev @fin-cian/integrator-webpack-plugin

Add plugin to webpack.config

    const IntegratorWebpackPlugin = require('@fin-cian/integrator-webpack-plugin');
    //...
    plugins: [
        //...
        new IntegratorWebpackPlugin({
            output: "widget.js", 
            publicPath: `http://localhost:${PORT}`
        }),
        //...
    ]

Options

NAME DEFAULT Description
output widget.js Name of javascript file to be added
publicPath http://localhost Prefix to be added to each asset filename