2.0.10
Ubuntu 17.10
2.5.13
https://jsfiddle.net/mmx38qxw/
I have followed these steps:
http://element.eleme.io/#/en-US/component/custom-theme
I am using nuxt.js 1.0.0-rc11 with webapck 3
Working custom theme :)
Hi,
I am tryin to customize the theme as it written here:
http://element.eleme.io/#/en-US/component/custom-theme
Content of my element-variables.scss:
`
$--collapse-border-color: #00A6EC;
$--collapse-header-color: #00A6EC;
$--collapse-header-height: 48px;
$--collapse-header-padding: 22px;
$--collapse-header-fill: white;
$--collapse-header-size: 18px;
$--collapse-content-fill: brown;
$--collapse-content-size: 20px;
$--collapse-content-color: orange;
$--font-path: '~element-ui/lib/theme-chalk/fonts';
@import "~element-ui/packages/theme-chalk/src/index";
`
When webpack compiles the scss, it gives me always this error:
Cannot find module 'element-ui/lib/theme-chalk/fonts/element-icons.woff?t=1510834658947'
I have checked and the element-icons.woff exists in the node_modules dir. I can't get rid of this annoying error.
What is the problem? How can I solve it?
Thanks,
Richard
Hey. I'm having this also
These relative modules were not found:
* ./fonts/element-icons.ttf?t=1510834658947 in ./node_modules/css-loader?{"sourceMap":false}!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-7ba5bd90","scoped":false,"hasInlineConfig":false}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":false}!./src/assets/styles/main.scss
* ./fonts/element-icons.woff?t=1510834658947 in ./node_modules/css-loader?{"sourceMap":false}!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-7ba5bd90","scoped":false,"hasInlineConfig":false}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":false}!./src/assets/styles/main.scss
vue version is 2.9.1
element-ui version is 2.0.10
@Reechee88 @rudirocha Please minify your project and upload it to GitHub.
had same problem
Closing for lack of reproduction.
Same problem...
custom theme doc
If delete the font file query string, it works fine.
Enabling {modules: true} in css-loader is causing the issue.
These dependencies were not found:
Does not occur when css-modules are disabled (as mentioned by rumanbsl).
Same issue here
vue-cli 3
To install them, you can run: npm install --save ~element-ui/lib/theme-chalk/fonts/element-icons.ttf ~element-ui/lib/theme-chalk/fonts/element-icons.woff
I was getting this exact error and was able to resolve it. I missed this important part of the custom theme docs:
Note that it is required to override icon font path to the relative path of Element's font files.
Adding $--font-path: '~element-ui/lib/theme-chalk/fonts';
before importing the theme's index.scss fixed the error.
Adding $--font-path: '~element-ui/lib/theme-chalk/fonts'; before importing the theme's index.scss fixed the error.
It's working without enabled css modules and give a same error on modules: true
This is because wrong path.
You should put your style.css
in this path:
node_modules/element-ui/lib/theme-chalk
If you look at the style.css content, you will find out why
This is because wrong path.
You should put yourstyle.css
in this path:node_modules/element-ui/lib/theme-chalk
If you look at the style.css content, you will find out why
and then ? what should i do? i saw this before,and how to solve icon import ?????
I was getting this exact error and was able to resolve it. I missed this important part of the custom theme docs:
Note that it is required to override icon font path to the relative path of Element's font files.
Adding
$--font-path: '~element-ui/lib/theme-chalk/fonts';
before importing the theme's index.scss fixed the error.
You are my best friend now
Most helpful comment
I was getting this exact error and was able to resolve it. I missed this important part of the custom theme docs:
Adding
$--font-path: '~element-ui/lib/theme-chalk/fonts';
before importing the theme's index.scss fixed the error.