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 webpack config #21

Closed
Aarbel opened this issue Aug 14, 2019 · 3 comments · Fixed by #30
Closed

Support for multiple webpack config #21

Aarbel opened this issue Aug 14, 2019 · 3 comments · Fixed by #30

Comments

@Aarbel
Copy link

Aarbel commented Aug 14, 2019

image

Got this error when using multiple webpack configs :
configuration has an unknown property '1'

This is caused by webpack config of type array instead of object.

When will you support multi webpack configs ? Thanks !

My webpack.config.xml

var config = {
    devtool: 'inline-source-map',
    mode: 'development',
};

const cordovaAppConfig = Object.assign({}, config, {
    name: "cordovaAppConfig",
    entry: path.resolve(__dirname, 'src/index.js'),
    output: {
       path: path.resolve(__dirname, 'www/js'),
       filename: "index.bundle.js"
    },
});

const injectedJsConfig = Object.assign({}, config, {
    name: "injectedJsConfig",
    entry: path.resolve(__dirname, 'src/webview-injection.js'),
    output: {
       path: path.resolve(__dirname, 'www/js'),
       filename: "webview-injection.bundle.js"
    },
});

module.exports = [
    cordovaAppConfig, injectedJsConfig,       
];
@kotarella1110
Copy link
Owner

Hi @Aarbel !
This plugin does not support exporting a Function and a Promise and multiple configurations.
I plan to support these in the near future! But this will take a little more time.
Thanks.

@Aarbel
Copy link
Author

Aarbel commented Aug 15, 2019

thank you @kotarella1110

@kotarella1110 kotarella1110 self-assigned this Sep 5, 2019
kotarella1110 added a commit that referenced this issue Sep 12, 2019
added support exporting a Function and a Promise and multiple configurations.

#21, #23
kotarella1110 added a commit that referenced this issue Oct 2, 2019
kotarella1110 added a commit that referenced this issue Oct 2, 2019
@kotarella1110
Copy link
Owner

@Aarbel In release v1.0.0-alpha.1, supported exporting a Function and a Promise and multiple configurations!

Test it out:

$ cordova plugin add cordova-plugin-webpack@alpha

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

Successfully merging a pull request may close this issue.

2 participants