0.0.1-beta.2 • Published 1 year ago

@icreate/ics-micro-frontend v0.0.1-beta.2

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

Usage

npm i @icreate/ics-micro-frontend

Features

  • SandBox:window沙箱

Importing library

You can import the generated bundle to use the whole library generated by this starter:

import microFrontend from '@icreate/sanbox'

Usage

import micro-frontend from '@icreate/micro-frontend';

const micro-frontend = new micro-frontend();

// execute scripts in micro-frontend
micro-frontend.execScriptInmicro-frontend('window.a = 1;console.log(window.a);');

// clear side effects added by micro-frontend, such as addEventListener, setInterval
micro-frontend.clear();