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

NetCore Webpack generates broken links in Prod builds #901

Open
anwnqvis opened this issue Jul 9, 2018 · 4 comments
Open

NetCore Webpack generates broken links in Prod builds #901

anwnqvis opened this issue Jul 9, 2018 · 4 comments

Comments

@anwnqvis
Copy link

anwnqvis commented Jul 9, 2018

I'm submitting a bug report

  • Library Version:
    0.33.1

Please tell us about your environment:

  • Operating System:
    Windows 10

  • Node Version:
    8.10.0

  • NPM Version:
    6.1.0

  • Browser:
    all?

  • Language:
    TypeScript 2.8.1

  • Loader/bundler:
    Webpack

Current behavior:
Files loaded with file-loader get no prefix in path but they are put in 'dist'. This makes IIS look for them under the 'wwwroot' folder instead of 'wwwroot/dist'.

  • What is the expected behavior?
    Files should have baseUrl 'dist/' instead of '/'.
@JeroenVinke
Copy link
Collaborator

Hey @anwnqvis 👋

is this when using javascriptservices or not?

@alexisszabo
Copy link

alexisszabo commented Feb 20, 2020

Using aurelia-cli v1.2.3, I was able to resolve this issue by changing the production build script in package.json to:

"build": "webpack --env.production --extractCss --config webpack.netcore.config.js"

Could/should the aurelia-cli be updated to use the .net core specific config file when generating a new .net core project?

@3cp
Copy link
Member

3cp commented Feb 20, 2020

I don't use .net, but this sounds right.
@Sayan751 ☝️ could you help to review the above proposal?

@Sayan751
Copy link
Member

@3cp Frankly, I have looked into the generated skeleton for netcore for the first time today :)
There are couple of things I find to be confusing.

  • The usage of a a second config file for netcore. why not generate just the correct one for netcore in the first go. Also I see that var originalConfig = webpackConfig({}); is not passing any arguments from cli to the webpack config, as it is the case normally.
  • It seems that the usage of Microsoft.AspNetCore.SpaServices.Webpack is now deprecated. So we need to upgrade the netcore skeleton anyway.

I think it is better to take a closer look at the generated skeleton, and do some cleanup as well as the necessary upgarde.

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

5 participants