Comments (9)
Found the solution for Angular. This is related to this issue..
First, in your .angular-cli.json, add this to the "apps" object :
"stylePreprocessorOptions": {
"includePaths": [
"../node_modules/semantic-ui-sass"
]
},
Then in your styles.scss, you can import like this :
@import "semantic-ui.scss";
To solve the icons error, just overwrite their path by prepending this before the import :
$icons-font-path: '/node_modules/semantic-ui-sass/icons';
$flags-image-path: '/node_modules/semantic-ui-sass/images';
Hope it helps !
from semantic-ui-sass.
You're importing the wrong module. You need to import semantic-ui-sass
from semantic-ui-sass.
I tried that too
ERROR in ./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js!./node_modules/resolve-url-loader!./src/client/stylesheets/main.scss
Module build failed:
@import "semantic-ui-sass";
^
File to import not found or unreadable: semantic-ui-sass.
from semantic-ui-sass.
Try @import "~semantic-ui-sass";
from semantic-ui-sass.
Got a different error now using
@import "~semantic-ui-sass"
in my main.scss
ERROR in ./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js!./node_modules/file-loader/dist/cjs.js!./node_modules/url-loader!./src/client/stylesheets/main.scss
Module build failed:
@import "~semantic-ui-sass";
^
Invalid CSS after "m": expected 1 selector or at-rule, was "module.exports = __"
from semantic-ui-sass.
hmm try @import "~semantic-ui-sass/semantic-ui.scss';
from semantic-ui-sass.
@import "~semantic-ui-sass/semantic-ui.scss';
worked. A new problem now is that the icons are not resolved.
ERROR in ./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js!./src/client/stylesheets/main.scss
Module not found: Error: Can't resolve '../../icons/icons.woff' in /dir/to/stylesheets
My webpack for the woff or related files are
{
test: /\.(eot|woff|woff2|ttf|svg|png|jpg)$/,
loader: 'url-loader?limit=30000&name=[name].[ext]',
},
I also tried this approach:
@import "~semantic-ui-sass/semantic-ui.scss";
@import "~semantic-ui-sass/icons";
the error thrown is:
ERROR in ./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js!./src/client/stylesheets/main.scss
Module build failed:
@import "~semantic-ui-sass/icons";
from semantic-ui-sass.
I am having this same issue. I am using mithril and webpack. Here is my webpack.config.coffee
...
module: rules: [
{
test: /\.(gif|png|jpe?g|svg)$/i
use: [
'file-loader'
loader: 'image-webpack-loader'
options:
bypassOnDebug: true
]
}
{
test: /\.(sass|scss|css)$/
use:[
{ loader: 'style-loader' }
{ loader: 'css-loader' }
{ loader: 'sass-loader' }
]
}
{
test: /\.(woff|woff2|eot|ttf|otf)$/,
loader: 'file-loader'
}
{
test: /\.(coffee|cson)$/
use:[
loader: 'coffee-loader'
options:
transpile:
presets: ['env']
]
}
]
resolve:
extensions: [
'.js', '.json'
'.coffee', '.cson', '.sass'
]
plugins: [
new HtmlWebpackPlugin()
]
from semantic-ui-sass.
Yeah, this package needs some love. I don't use Semantic-UI anymore so I hadn't paid much attention.
If anyone wants to jump in and maintain it, I'll gladly add them to the repo and package.
from semantic-ui-sass.
Related Issues (10)
- Replace more parts of sass with variables, such as colors. HOT 2
- How to include another theme HOT 1
- Fonts not found/fonts imported even with $import-google-fonts: false;
- Import in scss not working
- Compiling scss, Invalid US-ASCII character
- Compass function produces invalid CSS HOT 1
- No columnCount variable? HOT 3
- upgrade to new semantic-ui versions HOT 1
- Looking for maintainer HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from semantic-ui-sass.