webpack
Substitute loader forReplaces the content of a file. Defaults to null
but you can supply the new content as parameter.
Install
$ npm i -S substitute-loader
Usage
module: loaders: test: /\.mock.json$/ // default loader: "substitute" // custom content // loader: "substitute?{content: '{}'}"
// default, mock will equal nullvar emptyMock = ;// custom, mock will equal "{}"var emptyMock = ;