Skip to content
This repository was archived by the owner on Aug 5, 2021. It is now read-only.
This repository was archived by the owner on Aug 5, 2021. It is now read-only.

Doesn't work with rollup API #8

@nghuuphuoc

Description

@nghuuphuoc

It works from the command line (rollup -c) with the configuration file as

import multiEntry from 'rollup-plugin-multi-entry'

export default {
    entry: 'src/js/test/**.js',
    external: ['jQuery'],
    plugins: [multiEntry()],
    format: 'umd',
    dest: 'dist/js/myBundle.umd.js',
    globals: {
        'jQuery': 'jQuery'
    },
    moduleName: 'MyBundle'
}

But when trying to use the API (I am creating a gulp task):

var multiEntry = require('rollup-plugin-multi-entry');

gulp.task('bundle-umd', function() {
    return rollup.rollup({
        entry: 'src/js/test/**.js',
        external: ['jQuery'],
        plugins: [multiEntry]
    }).then(function(bundle) {
        return bundle.write({
            format: 'umd',
            dest: 'dist/js/myBundle.umd.js',
            moduleName: 'myBundle',
            globals: {
                'jQuery': 'jQuery'
            }
        });
    });
});

Running gulp bundle-umd gives me the error:

[13:44:38] Using gulpfile .../gulpfile.js
[13:44:38] Starting 'bundle-umd'...
[13:44:38] 'bundle-umd' errored after 3.03 ms
[13:44:38] Error: Could not load null: path must be a string
    at /node_modules/rollup/dist/rollup.js:7361:10
    at runMicrotasksCallback (node.js:337:7)
    at process._tickCallback (node.js:355:11)
    at Function.Module.runMain (module.js:503:11)
    at startup (node.js:129:16)
    at node.js:814:3

Do I miss anything?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions