🚀 Launch Week Day 5:Introducing Immutable Scans.Learn More →
Socket
Book a DemoInstallSign in
Socket

eui-micro-frontend-builder

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eui-micro-frontend-builder

A Custom webpack builders for eui micro frontend client build.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

eUI Micro frontend Builder

This is a custom webpack builder that is using angular architect package to build an angular module into a single js file. This can be then distributed and lazily loaded by an angular application.

How can i use the builder?

In your angular.json file, where projects are declared, under the architect.build set the builder to "eui-micro-frontend-builder:browser" .

Then you can build any module of your project like so: ng build --project features --prod --module=./app/features/module1/module1.module#Module --pluginName=module1 --sharedLibs=@micro/shared --outputPath=./features

Params

The builder support the below properties,

  • module: A string of the form path/to/file#exportName that acts as a path to include to bundle
  • pluginName: A name of compiled bundle
  • sharedLibs: A comma-delimited list of shared lib names used by current plugin
  • externals: A path to .json file which contains a list of external dependencies, like { dep1: 'mydep', dep2: 'another'}
  • extraWebpackConfig: path of the extra webpack configuration

Pay Attention!

Keep in mind that the builder works with the module mapping below. In case you import a module not mentioned here, you need to map it yourself by using the --externals <file.json> flag!

'rxjs': 'rxjs',
'@angular/core': 'ng.core',
'@angular/common': 'ng.common',
'@angular/forms': 'ng.forms',
'@angular/router': 'ng.router',
'@angular/platform-browser': 'ng.platform-browser',
'@angular/platform-browser/animations': 'ng.platform-browser-animation',
'@eui/core': 'eui.core',
'@eui/base': 'eui.base',
'@ngx-translate/core': 'ngx.translate',
'tslib': 'tslib'

Keywords

cli

FAQs

Package last updated on 23 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts