-
Notifications
You must be signed in to change notification settings - Fork 12k
Global styles and scripts are not injected if project path includes a junction #2726
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
Comments
We are experiencing same. SCSS files get bundled up but it's missing the style loader modules in the styles.bundle.js. So they never get injected when running the app. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
OS?
Windows 10
Versions.
angular-cli: 1.0.0-beta.17
node: 6.6.0
os: win32 x64
Repro steps.
The log given by the failure.
The global styles (
src\styles.css
) won't be injected, the resultingdist\styles.bundle.js
won't have any trace ofstyle-loader
. I think the same thing will happen with global scripts, but I focused on styles.Mention any other details that might be useful.
(Junction is one flavor of symbolic link on Windows; have not tested with other kinds. I would not be surprised if the same thing happens with symbolic or hard links on Linux, but I have not tested.)
The problem is related to the webpack configuration, specifically the
include
check for the global files that need to be included forstyle-loader
/script-loader
processing. The file names used to build the configuration (styles
andscripts
arrays) are derived from the project location and don't reflect anything about the junction. The resource names passed in by webpack for matching at runtime, however, are normalized (presumably with something likefs.realpath
) and point to the original location of the files. Consequently, file names that should be selected for special processing are not matched.It is possible that it is webpack that should process file names in the configuration in the same way it normalizes the names of the resources passed in. Or, at the CLI level, file names in the config could be normalized with
fs.realpathSync
. Or one can just avoid using links.The text was updated successfully, but these errors were encountered: