0.0.1 • Published 6 years ago
@develerik/conditional-loader v0.0.1
conditional-loader
conditional loader for webpack
Install
- Using npm:
npm install --save-dev @develerik/conditional-loader
- Using yarn:
yarn add --dev @develerik/conditional-loader
Usage
webpack.config.js
module: {
rules: [
{
test: /\.js$/,
use: ["@develerik/conditional-loader", "babel-loader"],
}
]
}
Example
This block will only be there in development mode (set NODE_ENV
to development
).
Multiple modes can be used by comma-separating them (e.g. // +condition:development,production
).
// +condition:development
const foo = "foo";
console.log(foo);
// -condition
License
0.0.1
6 years ago