Version: 6.8.0 ASP.NET Core & Angular
Download and build the project. Unmodified. Styles do not appear to be applied. Browser console message: "Refused to apply style from '<URL>' because its MIME type ('') is not a supported stylesheet MIME type, and strict MIME checking is enabled." No errors is log file. "Bundle & Minifier" and "Web Compiler" extensions are installed. cd to folder "*.Web.Public" and ran "npm run create-bundles" from command line. (Don't know how to "run Web Compiler" per #6527) Please advise.
11 Answer(s)
-
0
try run
npm run create-bundles
in Web.Public folder. -
0
running
npm run create-bundles
in Web.Public folder is the solution. Thank you. -
0
-
0
I have not reproduced your problem with V7. You can download the Zero Demo v7 project to see if the same problem exists.
-
0
-
0
@timmackey
Notice that npm run create-bundles never finishes, though.
You can remove the
--watch
parameter"create-bundles": "webpack --progress --profile --watch --mode=development"
-
0
The first time I ran
npm run create-bundles
without the --watch parameter it exited the batch job normally. However when I tried to recompile is Visual Studio, the Output window displayed the following message:Build delayed until Bower/npm packages finish restoring.
Closing the cmd window had no effect. I had to restart Visual Studio to be able to compile again. .Web.Public executed normally. Subsequent attempts to run
num run create-bundles
results in the following error: -
0
Hi @timmackey
"npm run create-bundles" is designed for development time. So, when you run it, it watches your css and js files and updated the bundles automatically.
For production, you need use "npm run build" command which exists after creating the bundles.
-
0
-
0
Same problem in Version 8.0.0 for unmodified downloaded project.
In v8.0 we no longer use
Bundle & Minifier
.please try:
npm run create-bundles npm run build
package.json
"scripts": { "create-bundles": "gulp buildDev", "build": "gulp build" }
-
0
@maliming - Your suggetion worked.