write-microfrontend-descriptor-json

adapted version of [write-json-webpack-plugin] for write compiled hash into output json

Usage no npm install needed!

<script type="module">
  import writeMicrofrontendDescriptorJson from 'https://cdn.skypack.dev/write-microfrontend-descriptor-json';
</script>

README

Write Microfrontend Descriptor Json Plugin

Emits a JSON file that contains data passed through to it. Adds compiled hash.

// Add to your Webpack config file
var path = require('path');
var WriteDescriptorJsonPlugin = require('write-microfrontend-descriptor-json');

module.exports = {
  plugins: [new WriteDescriptorJsonPlugin()]
};  
new WriteDescriptorJsonPlugin({
    object: [object],
    path: 'public',
    // default output is info.json
    filename: 'info.json',
    pretty: true 
})