macros-loader

0.0.1 • Public • Published

Preprocessor for Webpack

fork from git+https://github.com/jdmichaud/preprocessor-loader.git

why

'cause author stop maintaining this project, and my issue was left to open for a while

use

// webpack.config.js

{
  module: {
    loaders: [
      { test: /\.js$/,
        loader: 'pprocessor?config=pprocessor-loader.json',
        exclude: [/bower_components/, /node_modules/],
      },
    ],
  }
}

// pprocessor-loader.json

"macros": [
    {
      "declaration" : "LOG_INFO(message)",
      "definition" : "console.log(message + ' (__FILE__:__LINE__)');",
      "reg": "(?=src/)(.*)"
    },
]

Readme

Keywords

Package Sidebar

Install

npm i macros-loader

Weekly Downloads

2

Version

0.0.1

License

ISC

Unpacked Size

5.88 kB

Total Files

4

Last publish

Collaborators

  • javaer_ljw