Skip to content

The possibility of having many input and output files #2744

@hstaniszewski

Description

@hstaniszewski

What problem does this feature solve?

The ability to have multiple input and output files in vue-cli-service build --target lib mode would be very useful. I tried to configure the Webpack in the vue.config.js file to pass many input files and generate many output files, unfortunately without success. It looks like it is not possible. I have a simple usage example, I want to build extensions in separate files.

What does the proposed API look like?

module.exports = {
    configureWebpack: config => {
        config.output = {
            filename: '[name].js',
            path: resolve('/dist'),
            library: '[name]',
            libraryTarget: 'umd'
        }

        config.entry = {
            'components/a': 'src/a.js',
            'directives/b': 'src/b.js',
            'directives/c': 'src/c.js'
            // etc
        }
    }
}

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