1.4.1 • Published 5 years ago

@depack/bundle v1.4.1

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

@depack/bundle

npm version

@depack/bundle is The Source Code For The Bundle Logic To Prepare Temp Files. Because Google Closure Compiler cannot import JSX files, we create a temp directory to put them in there, and also allow to update preact to @externs/preact in the temp as well, so that Preact can be referenced separately from the compiled code.

yarn add @depack/bundle

Table Of Contents

API

The package is available by importing its default function:

import generateTemp from '@depack/bundle'

async generateTemp(  entry: string,  config?: TempConfig,): void

Generates a temp directory for the given entry file and transpiles JSX files that are references in it. Any JS files will also be placed in the TEMP dir if there is a single JSX file found. This is because references to JSX files need to be updated in JS files to point to the temp dir.

If the required file's path is higher than the current dir, the bundler will check if belongs to a linked package, and generate temp files in temp/node_modules dir rather than pollute the filesystem above CWD.

TempConfig: Options for generating the temp directory.

Copyright

1.4.1

5 years ago

1.4.0

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago