Giter Club home page Giter Club logo

css-object-loader's People

Contributors

pl12133 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

css-object-loader's Issues

Support File Loader

Users of css-loader have become accustomed to having url('...') statements processed by url-loader and file-loader. This loader should emit fonts and images in the same exact way that css-loader does.

I have had no luck on finding documentation on the topic of a loader requiring other files in the way css-loader does. It seems that css-loader injects a runtime to require all the assets from url() statements, but I have yet to find a viable solution.

[Webpack 2] Doesn't seem to work with other loaders

I've tried with both css-loader and postcss-loader; my Webpack config is as follows:

module:{ 
   rules: [
            {
                test: /\.(css)$/,
                loaders: ["css-object-loader", "postcss-loader", "css-loader"],
                exclude: /node_modules/,
            }
    ]
}

Error as follows:

ERROR in ./source/styles/menu.css
Module build failed: Syntax Error

(1:1) Unknown word

> 1 | exports = module.exports = require("../../node_modules/css-loader/lib/css-base.js")(undefined);
    | ^
  2 | // imports
  3 |

If I take out postcss-loader so css-loader is piping straight into css-object-loader, I get this:

ERROR in ./source/styles/menu.css
Module build failed: Error: undefined:6:45: property missing ':'
    at error (D:\projects\downright\node_modules\css\lib\parse\index.js:62:15)
    at declaration (D:\projects\downright\node_modules\css\lib\parse\index.js:223:33)
    at declarations (D:\projects\downright\node_modules\css\lib\parse\index.js:252:19)
    at rule (D:\projects\downright\node_modules\css\lib\parse\index.js:560:21)
    at rules (D:\projects\downright\node_modules\css\lib\parse\index.js:117:70)
    at stylesheet (D:\projects\downright\node_modules\css\lib\parse\index.js:81:21)
    at Object.module.exports [as parse] (D:\projects\downright\node_modules\css\lib\parse\index.js:564:20)
    at getParsedStylesheet (D:\projects\downright\node_modules\css-object-loader\src\index.js:22:14)
    at Object.cssObjectLoader (D:\projects\downright\node_modules\css-object-loader\src\index.js:14:26)
 @ ./source/OuterContainer.jsx 7:0-39
 @ ./source/ContextMenuProvider.jsx
 @ ./source/index.js
 @ multi ./source/index.js

I assume this is because of Webpack 2?

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.