New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@gioboa/vite-module-federation

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gioboa/vite-module-federation - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

lib/dev-externals-mixin.d.ts

6

lib/index.d.ts
import { BuildHelperParams } from '@softarc/native-federation/build.js';
export declare function federation(params: BuildHelperParams): Promise<{
name: string;
options(o: unknown): Promise<void>;
closeBundle(): Promise<void>;
}>;
export declare const federation: (params: BuildHelperParams) => Promise<any>;
{
"name": "@gioboa/vite-module-federation",
"version": "0.1.0",
"version": "0.2.0",
"description": "Vite/Rollup plugin for Module Federation",

@@ -38,3 +38,3 @@ "type": "module",

"peerDependencies": {
"@softarc/native-federation": "^0.9.2-beta.7"
"@softarc/native-federation": "^1.0.0-beta.2"
},

@@ -44,4 +44,6 @@ "devDependencies": {

"microbundle": "^0.15.1",
"pretty-quick": "^3.1.3"
"mime-types": "^2.1.35",
"pretty-quick": "^3.1.3",
"vite": "^3.1.3"
}
}

@@ -31,3 +31,3 @@ # Vite/Rollup plugin for Module Federation

import { federation } from '@gioboa/vite-module-federation';
import { esBuildAdapter } from './module-federation/esbuild-adapter';
import { createEsBuildAdapter } from '@softarc/native-federation-esbuild';

@@ -45,3 +45,5 @@ // https://vitejs.dev/config/

},
adapter: esBuildAdapter,
adapter: createEsBuildAdapter({
plugins: [],
}),
}),

@@ -55,3 +57,3 @@ [...]

### Second step
### Define configs

@@ -65,31 +67,4 @@ You need to define two different configurations in the `federationConfig` property.<br>

### Last step
As this plugin is tooling-agnostic, you need a simple adapter for your bundler, it's just a matter of one function.
Here an example:
```typescript
import type { BuildAdapter } from '@softarc/native-federation/build';
import * as esbuild from 'esbuild';
export const esBuildAdapter: BuildAdapter = async (options) => {
const { entryPoint, external, outfile } = options;
await esbuild.build({
entryPoints: [entryPoint],
external,
outfile,
bundle: true,
sourcemap: false,
minify: true,
format: 'esm',
target: ['esnext'],
});
};
```
<br>
### So far so good 🎉
Now you are ready to use Module Federation in Vite!

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc