-
Notifications
You must be signed in to change notification settings - Fork 113
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
ExpandGlobs add prefix '/' #118
base: master
Are you sure you want to change the base?
Conversation
Does this mean that all |
What problem is this trying to solve? |
|
Trying to fix the path problems in DEBUG mode when using wildcards inputFiles like the following: |
Aren't you using services.AddWebOptimizer(false, false); in development mode? |
No, i'm not specifying the minify flag, just let the running mode decide to minify or not. I'm USING WebOptimizer.Core and WebOptimizer.Core.Sass Source Code from github; Code using:
|
This PR fixes the problem by always prefixing a slash, but what if you DO want the bundle to be on a relative path? The fix should check if the globbing pattern contains the prefix, and only prepend it when that's the case. |
check on what standard? there is no extra info for you to know whether to add the slash or not. you can use the bundle (release or dev mode) on root level pages (www.domain.com/aaa), or pages in subfolders (www.domain.com/aaa/bbb), so relative path will cause problems. I can think of two ways to solve this problem:
|
Check on whether the globbing pattern is relative or not. If it contains a forward slash, also apply this slash to the output files, if not, then don't apply it. I think this can be achieved inside |
Seems quite possible that this fixes #199 Is there anything I can do to help get this pr merged? |
following inputFiles + debug mode (no bundling and minification), the output js paths missing prefix "/"!
{
"outputFileName": "/lang.min.js",
"inputFiles": [
"/i18n/**/*.js"
],
"minify": {
"enabled": false
}
},