webpack-mem-compile

1.0.2 • Public • Published

webpack memory compile

Compile from a webpack config to a string in memory.

Install

npm install --save webpack-mem-compile

Use

Using a webpack config with an entry point:

import { webpackCompile } from 'webpack-mem-compile';

const code = await webpackCompile({
    webpack,
    config: {
        entry: 'foo.js';
    }
})

Using raw code:

import { webpackCompile } from 'webpack-mem-compile';

const code = await webpackCompile({
    webpack,
    code: `
        console.log('Hello World!');
    `
})

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    1
  • 1.0.1
    0

Package Sidebar

Install

npm i webpack-mem-compile

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

16.3 kB

Total Files

15

Last publish

Collaborators

  • bluepnume