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!');
    `
})

/webpack-mem-compile/

    Package Sidebar

    Install

    npm i webpack-mem-compile

    Weekly Downloads

    15

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    16.3 kB

    Total Files

    15

    Last publish

    Collaborators

    • bluepnume