Skip to content

Instantly share code, notes, and snippets.

@JulienPradet
Last active November 28, 2016 09:39
Show Gist options
  • Select an option

  • Save JulienPradet/d37479e0b1f6b83bfa815b000574e648 to your computer and use it in GitHub Desktop.

Select an option

Save JulienPradet/d37479e0b1f6b83bfa815b000574e648 to your computer and use it in GitHub Desktop.

Revisions

  1. JulienPradet revised this gist Nov 28, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion example.js
    Original file line number Diff line number Diff line change
    @@ -17,6 +17,6 @@ entryStream.push(null)

    var compiler = webpack(/* config */)

    const bundleStream = compiler.transformStream(stream)
    const bundleStream = compiler.transformStream(entryStream)

    fs.writeFile('config.js', bundleStream)
  2. JulienPradet revised this gist Nov 28, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion example.js
    Original file line number Diff line number Diff line change
    @@ -19,4 +19,4 @@ var compiler = webpack(/* config */)

    const bundleStream = compiler.transformStream(stream)

    fs.writeFile('bundle.js', bundleStream)
    fs.writeFile('config.js', bundleStream)
  3. JulienPradet created this gist Nov 28, 2016.
    22 changes: 22 additions & 0 deletions example.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    import webpack from 'webpack'
    import {Readable} from 'stream'

    const entryStream = new Readable()
    entryStream.push(`
    import { configure } from '@kadira/storybook';
    function loadStories() {
    require('./story1.js');
    require('./story2.js');
    require('./story3.js');
    }
    configure(loadStories, module);
    `)
    entryStream.push(null)

    var compiler = webpack(/* config */)

    const bundleStream = compiler.transformStream(stream)

    fs.writeFile('bundle.js', bundleStream)