Commit 0c3c41038c55d9cdb9fd1a114387ae6b63ba8a40
now expects a dot in the full path, which breaks the path of my themes. Seems to be an issue caused by that aforementioned commit.
URL now:
http://localhost/build/css/semantic/.themes/default/assets/fonts/icons.ttf
causes: 404 not found
URL before that commit:
http://localhost/build/css/semantic/themes/default/assets/fonts/icons.ttf
notice the dot before themes.
The commit should add . plus a path separator, like ./ which should resolve as same folder.
I'd like to help fix, but can you provide your semantic.json, or particular variable config thats causing this issue.
I'm developing on Windows 10. Maybe Windows doesn't resolve the dot? I also don't run any special theme configs, using the default at the moment. The dot gets added no matter which system my website runs on though. On my production CentOS server it still expects the dot.
Here's my semantic.json:
{
"base": "resources/assets/semantic",
"paths": {
"source": {
"config": "src/theme.config",
"definitions": "src/definitions/",
"site": "src/site/",
"themes": "src/themes/"
},
"output": {
"packaged": "dist/",
"uncompressed": "dist/components/",
"compressed": "dist/components/",
"themes": "dist/themes/"
},
"clean": "dist/"
},
"permission": false,
"autoInstall": false,
"rtl": false,
"version": "2.2.0"
}
I'd like to figure this out before pushing the next version.
I just set up a fresh electron project with semantic-ui. Semantic-ui is still expecting the dot before themes. Using semantic-ui from branch next commit af7fcf64599664aca3cbc1cd1fc8f0f2e235217b
(That commit has the @defaultTextFocusColor is undefined error, so gulp build won't work completely. See #3975 for a fix.)
Chrome's errors:
error log.txt
My semantic.json:
semantic.json.txt
My package.json:
package.json.txt
My OS: Windows 10 x64
Hope this helps.
I'm not sure how to proceed, but I'm hoping to get more feedback on if this path changes causes further issues after 2.2 release.
For now I'm going to close this discussion.
I can confirm this issue (or one maybe related) is still there in 2.2. I get urls in the output css like: src: url(".\../themes/default/assets/fonts/icons.eot");. This completely breaks webpack builds, so I had to remove both flags and icons. Also I'm not sure if it helps but in the default theme which I'm using the global path to the font files look OK to me:
@imagePath : '../../themes/default/assets/images';
@fontPath : '../../themes/default/assets/fonts';
Also getting the issue here with 2.2
My issue is fixed. Seems to be some issue with an old version of gulp-cli (or gulp in general).
Try uninstalling any global gulp / gulp-cli packages.
After that install the latest gulp-cli globally and try building semantic-ui again.
Mine is not fixed. I've tried to drill in and found that the semantic.min.css and semantic.css differs.
Minified version
background:url(themes/default/assets/images/flags.png)
Non minified version
url("./themes/default/assets/images/flags.png")
For now, I am doing a global search and replace to insert ./ into the path.
Most helpful comment
Mine is not fixed. I've tried to drill in and found that the semantic.min.css and semantic.css differs.
Minified version
Non minified version
For now, I am doing a global search and replace to insert ./ into the path.