Define an entry point for webpack.
Entry Pack
configures the actual entry point
for the bundle and can be used multiple times to define multiple entry points.
Entry Pack
is included in the complete
and default
editions.
Current Release
npm install --save-dev @packmule/entry-pack
Nightly Build
npm install --save-dev @packmule/entry-pack@nightly
EntryPack(path: string, name?: string)
- root - Used to build an absolute path of the configured entry file path.
Example
Set single entry point and generate an app
bundle.
import Packmule from '@packmule/core';
import EntryPack from '@packmule/entry-pack';
const packmule = new Packmule();
packmule.add(new EntryPack('assets/entry.ts', 'app'));
return packmule.generate();
Example
Set multiple entrypoints and generate a one
and a two
bundle.
import Packmule from '@packmule/core';
import EntryPack from '@packmule/entry-pack';
const packmule = new Packmule();
packmule.add(new EntryPack('assets/one.ts'));
packmule.add(new EntryPack('assets/two.ts'));
return packmule.generate();