{"action":"opened","issue":{"url":"https://api.github.com/repos/aurelia/cli/issues/874","repository_url":"https://api.github.com/repos/aurelia/cli","labels_url":"https://api.github.com/repos/aurelia/cli/issues/874/labels{/name}","comments_url":"https://api.github.com/repos/aurelia/cli/issues/874/comments","events_url":"https://api.github.com/repos/aurelia/cli/issues/874/events","html_url":"https://github.com/aurelia/cli/issues/874","id":318082677,"number":874,"title":"dotnet runtime, ASP.NET Core Webpack template and copy-webpack-plugin doesn't work together","user":{"login":"graycrow","id":1478788,"avatar_url":"https://avatars3.githubusercontent.com/u/1478788?v=4","gravatar_id":"","url":"https://api.github.com/users/graycrow","html_url":"https://github.com/graycrow","followers_url":"https://api.github.com/users/graycrow/followers","following_url":"https://api.github.com/users/graycrow/following{/other_user}","gists_url":"https://api.github.com/users/graycrow/gists{/gist_id}","starred_url":"https://api.github.com/users/graycrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graycrow/subscriptions","organizations_url":"https://api.github.com/users/graycrow/orgs","repos_url":"https://api.github.com/users/graycrow/repos","events_url":"https://api.github.com/users/graycrow/events{/privacy}","received_events_url":"https://api.github.com/users/graycrow/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-26T15:29:46Z","updated_at":"2018-04-26T15:29:46Z","closed_at":null,"author_association":"NONE","body":"<!--\r\nBUGS: Please use this template.\r\n\r\nSUPPORT REQUESTS/QUESTIONS: If you have a support request or question please\r\nsubmit them to StackOverflow using the tags aurelia and aurelia-framework\r\nhttp://stackoverflow.com/questions/tagged/aurelia\r\nor the Aurelia Gitter https://gitter.im/aurelia/discuss\r\n\r\nBlue Spire offers paid support agreements. Further information regarding paid support\r\nmay be obtained by emailing support@bluespire.com\r\n\r\nFuture support requests submitted here will be closed.\r\n\r\nThe HTML comments below are for your reference, and are not displayed\r\nwhen your issue is submitted, feel free to leave them.\r\n\r\nChoose one of the two headings, delete the other.\r\n-->\r\n**I'm submitting a bug report**\r\n\r\n* **Library Version:**\r\n0.33.1\r\n\r\n\r\n**Please tell us about your environment:**\r\n* **Operating System:**\r\nWindows 8.1\r\n\r\n* **Node Version:**\r\n9.11.1\r\n<!--\r\nMinimum supported Node version is latest Node 4.x LTS\r\nrun `node -v`\r\n-->\r\n\r\n* **NPM Version:**\r\n5.6.0\r\n<!--\r\nMinimum supported NPM version is 3.x\r\nrun `npm -v`\r\n-->\r\n\r\n* **Browser:**\r\nall\r\n* **Language:**\r\nTypeScript\r\n\r\n* **Loader/bundler:**\r\nWebpack\r\n\r\n**Current behavior:**\r\n\r\n1. Create a new project:\r\n```\r\nau new --here\r\n\r\n3. Webpack\r\n2. ASP.NET Core\r\n2. TypeScript\r\n3. Maximum Minification\r\n3. Sass\r\n1. None\r\n2. No\r\n1. Visual Studio Code\r\n1. Yes\r\n1. Yes\r\n```\r\n\r\n2. Run project with dotnet\r\n\r\n```\r\ndotnet restore\r\ndotnet run\r\n```\r\n\r\n3. Open a browser and go to [http://localhost:5000/](http://localhost:5000/). \r\n\r\n**Till this moment everything works as expected and \"Hello World!\" is displayed on the page.**\r\n\r\n4. Shut down an application an modify `webpack.config.js` in order to copy favicon.ico when environment is **not** a production:\r\n`...when(!production, new CopyWebpackPlugin([{ from: 'static/favicon.ico', to: 'favicon.ico' }])),`\r\n\r\n5. Run the project again.\r\n\r\n* **What is the expected behavior?**\r\n\r\nInstead of displaying **Hello World!** the page is blank and there is an error in dev console: \r\n```\r\nLoading failed for the <script> with source “http://localhost:5000/app.bundle.js”.\r\nLoading failed for the <script> with source “http://localhost:5000/vendor.bundle.js”.\r\n```\r\n\r\n<!--\r\nIf the current behavior is a bug, please provide the steps to reproduce.\r\n-->\r\n\r\nThe reason for this error is the fact, that with copy-webpack-plugin enabled, the `index.html` file is created in the `wwwroot/dist` folder and dotnet serves this file instead of `/Home/Index` view. This `index.html` file is generated from `index.ejs` template and has wrong script paths. Also, the specified `favicon.ico` file is not copied to the dist folder in this case.  Without copy-webpack-plugin enabled, `wwwroot/dist/index.html` is not generated. If I just run `au build`, then `wwwroot/dist/index.html` is generated, but `favicon.ico` gets copied anyway.\r\n\r\n* **What is the motivation / use case for changing the behavior?**\r\n\r\nThe ASP.NET Core Webpack template doesn't work with such common scenario as copying static files to output folder."}}
{"actor":{"display_login":"graycrow"}}