Webpack and the Aurelia CLI

I have a problem with new aurelia cli.
in the new version of ‘aurelia-cli’ I create new project and customize it with Webpack and then I add some proxies to Webpack.config.js file but when I run ‘npm start’ these proxies don’t apply in my project
so I checked it and noticed when I run ‘npm start’ then the npm runs ‘au run’.
how do I change the package.json file to apply my project’s proxies.
thank you for advise

1 Like

It seems that this issue is fixed with this change. The change is not yet released. You may try the suggested change yourself. Basically, change the “aurelia_project/tasks/run.[jt]s” file.

1 Like

I applied your change but it didn’t work

1 Like

In that case, it might be useful to share some code of what you have tried so far.

1 Like

this is my change in the ‘Webpack.config.js’ file

devServer: {
   contentBase: outDir,
   // serve index.html for all 404 (required for push-state)
   historyApiFallback: true,
   host: '',
   port: 80,
   proxy: [
       path: '/app/**',
       target: '',
       changeOrigin: true,
       secure: false

and this is my change in the ‘run.js’ file

https: config.devServer
1 Like

You need to replace the https: config.devServer with ...config.devServer as indicated here. This should ideally solve the problem.


oh it works thank you very much :blush:

1 Like

I am glad it got resolved :slight_smile: