Skip to content

Webpack loader that takes a Preons config and converts directly into css

Notifications You must be signed in to change notification settings

preons/preons-webpack-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Preons Webpack Loader

Usage

Require the yaml inside the js file.

require("./preons.yaml");

Add rule to webpack.config.js

const path = require("path");

module.exports = {
  //...
  mode: "development",
  entry: path.resolve(__dirname, "fixtures") + "/preons.js",
  module: {
    rules: [
      {
        test: /\.ya?ml$/,
        use: [
          "style-loader",
          "css-loader",
          {
            loader: path.resolve(__dirname, "lib") + "/loader.js",
            options: {
              /* ... */
            },
          },
          "yaml-loader",
        ],
      },
    ],
  },
};

About

Webpack loader that takes a Preons config and converts directly into css

Resources

Stars

Watchers

Forks

Packages

No packages published