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

Multiple destination files #35

Open
ValentinCreative opened this issue Jul 9, 2020 · 0 comments
Open

Multiple destination files #35

ValentinCreative opened this issue Jul 9, 2020 · 0 comments

Comments

@ValentinCreative
Copy link

Hi,

Hi have an issue with the way graphql files are imported.

Let's assume you have a project with two or more destination files, let's say :
front.js
admin.js

entry   : {
    front : `./src/front.js`,
    admin : `./src/admin.js`,
},

output : {
    path          : path.join(__dirname, `static/assets/`),
    filename      : `[name].js`,
    publicPath    : `/assets/`,
},

module : {
    rules : [
        {
            test   : /\.graphql?$/,
            loader : `webpack-graphql-loader`,
            options: {
                output : 'string',
                minify : true,
            },
        },
    ]
}

If I require a graphql file in admin, it will also be imported in front.js.
In fact all .graphql files will be imported in all my dest files.
I don't know how to prevent this behavior ?

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