aurelia / bootstrapper-webpack

A custom bootstrapper for using Webpack with Aurelia
MIT License
8 stars 6 forks source link

Change path to app-bundle.js in vendor-bundle.js #11

Closed radenkozec closed 8 years ago

radenkozec commented 8 years ago

I'm submitting a bug report

Please tell us about your environment:

Current behavior: I am using Webpack with CLI on ASP.NET Core project. I am using CLI for build and run project via Visual Studio. Everything works fine if I go to http://localhost:9000/index.html and Aurelia Hello World is loaded.

When I try to use Aurelia from ASP.NET MVC View using problems occur. My code in ASP.NET MVC View looks like this: `

`

I have changed path to vendor-bundle.js to point to wwwRoot folder When I try to load view path to app-bundle.js still looking for Home/script/app-bundle.js instead of looking in wwwRoot folder. It seams that path of app-bundle.js is hardcoded in vendor-bundle.js file. Is there a way to configure it inside aurelia.json or somewhere to look into wwwRoot folder?

niieani commented 8 years ago

You need to configure the output path in Webpack if you want to use a subdirectory. Note that your combination of tooling is not yet officially supported.

radenkozec commented 8 years ago

@niieani Can you please to give me clue how to configure output path in Webpack. I am not familiar with Webpack configuration.

niieani commented 8 years ago

If you're using configs provided in the skeletons, see this line of code: https://github.com/aurelia/skeleton-navigation/blob/master/skeleton-esnext-webpack/webpack.config.js#L16.

radenkozec commented 8 years ago

@niieani I have copied your webpack.config into root of my project. Changed line you suggested and then build project using CLI au build. Nothing happens. Path in vendor-bundle.js still remains like "app-bundle":"../scripts/app-bundle" Not sure if CLI uses this new copied config?

niieani commented 8 years ago

CLI does not support Webpack yet, so not sure what would that accomplish.