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

webpack.netcore.config.js should pass environment/arguments to webpack.config #1163

Open
alexisszabo opened this issue Feb 21, 2020 · 5 comments

Comments

@alexisszabo
Copy link

I'm submitting a bug report

  • Library Version:
    1.2.3

  • Loader/bundler:
    Webpack

Current behavior:

Generating a new aurelia project using webpack and .net core produces a webpack.netcore.config.js file that does not pass environment variables or arguments to webpack.config

  • What is the expected behavior?

The webpack.netcore.config.js should change from this (only relevant portions shown):

const webpackConfig = require('./webpack.config');
var originalConfig = webpackConfig({});

module.exports = () => {
  let config = originalConfig;

to this:

const webpackConfig = require('./webpack.config');

module.exports = (env, argv) => {
  let config = webpackConfig(env, argv);

so that environment variables and arguments are passed.

@3cp
Copy link
Member

3cp commented Feb 21, 2020

The .net config is definitely overlooked when we refactor our webpack setup where we change webpack config file quite a lot.

If you would like to create a PR on all the fix around .net, @Sayan751 and I can help review it. Thanks!

@Sayan751
Copy link
Member

I left a comment in #901. I think these issues are somewhat related.

@alexdresko
Copy link

@Sayan751 Could you please please please share a demo project that works for both development and production builds? I'm having SO much difficulty getting this right.

@Sayan751
Copy link
Member

@alexdresko Know what? Share you non-working repo with me instead. It will help me with a starting point :)

@alexisszabo
Copy link
Author

The .net config is definitely overlooked when we refactor our webpack setup where we change webpack config file quite a lot.

If you would like to create a PR on all the fix around .net, @Sayan751 and I can help review it. Thanks!

Apologies. I ended up removing .net completely from my project, and moving to the cli-bundler, so didn't get around to making a PR for this.

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

4 participants