0
我試圖整合Materialise的,但是當我嘗試添加角Materialise的字體
"./node_modules/materialize-css/dist/js/materialize.js"
和
"./node_modules/materialize-css/sass/materialize.scss",
到webpack.config.json
我得到這個錯誤建立(我得到多個):
ERROR in ./~/css-loader?{"sourceMap":false,"importLoaders":1}!./~/postcss-loader?{"ident":"postcss"}!./~/sass-loader/lib/loader.js?{"sourceMap":false,"precision":8,"includePaths":[]}!./~/materialize-css/sass/materialize.scss
Module not found: Error: Can't resolve '../fonts/roboto/Roboto-Thin.woff2' in 'C:\Users\Administrateur\Documents\dev\git\front-ptc-angular\node_modules\materialize-css\sass'
@ ./~/css-loader?{"sourceMap":false,"importLoaders":1}!./~/postcss-loader?{"ident":"postcss"}!./~/sass-loader/lib/loader.js?{"sourceMap":false,"precision":8,"includePaths":[]}!./~/materialize-css/sass/materialize.scss 6:77358-77402
@ ./~/materialize-css/sass/materialize.scss
@ multi ./~/materialize-css/sass/materialize.scss ./src/assets/scss/main.scss
有什麼想法?
編輯:
我通過NPM
然後加入兩行,我的WebPack配置
您是否試過https://www.npmjs.com/package/angular2-materialize並通過底部的安裝指南運行? –
我通過NPM瞭解到,這不是我用物化做的第一個項目,但我從來沒有遇到過這樣的問題:/ –