Coder Social home page Coder Social logo

Comments (9)

NideoTV avatar NideoTV commented on July 22, 2024 2

@jhnferraris

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.

joshmanders avatar joshmanders commented on July 22, 2024

You're importing the wrong module. You need to import semantic-ui-sass

from semantic-ui-sass.

jhnferraris avatar jhnferraris commented on July 22, 2024

@joshmanders

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.

joshmanders avatar joshmanders commented on July 22, 2024

Try @import "~semantic-ui-sass";

from semantic-ui-sass.

jhnferraris avatar jhnferraris commented on July 22, 2024

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.

joshmanders avatar joshmanders commented on July 22, 2024

hmm try @import "~semantic-ui-sass/semantic-ui.scss';

from semantic-ui-sass.

jhnferraris avatar jhnferraris commented on July 22, 2024

@joshmanders

@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.

jhessin avatar jhessin commented on July 22, 2024

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.

joshmanders avatar joshmanders commented on July 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.