Skip to content

Latest commit

 

History

History

pack-entry

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Entry Pack npm-latest

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.

Overview

Setup

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

API

EntryPack(path: string, name?: string)

Options

  • root - Used to build an absolute path of the configured entry file path.

Usage

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();

License

MIT