Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple targets #29

Open
ukch opened this issue Dec 6, 2016 · 0 comments
Open

Support for multiple targets #29

ukch opened this issue Dec 6, 2016 · 0 comments

Comments

@ukch
Copy link

ukch commented Dec 6, 2016

The Webpack docs describes a way to specify multiple targets by making module.exports a list.
I would like to use Webpack to generate JS files and asset files, and need quite a different config for each. Here's a snippet of my config:

module.exports = [
{
    entry: {js entries here},
    output: {
        path: BASE_PATH,
        filename: "js/[name].[hash].js",
    },
},
{
    entry: {
        // This file contains includes for all my asset files. I am not interested in the
        //  final JS file, rather the generated asset files.
        assets: "./webpack-entries/assets.js",
    },
    output: {
        path: BASE_PATH,
        filename: "entries/[name].js",
    },
    module: {
        loaders: [CSS and image loaders defined here],
    },
},
];

I would like to use manifest-revision-webpack-plugin to generate a manifest containing both my asset and JS files, but I can't see a way to do that. AFAICT the only way to do that is to define it in the (target-specific) 'plugins' section, which would overwrite itself for each target (in this case leaving me with only the assets in the manifest, not the JS).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant