Skip to content

Commit

Permalink
Merge pull request #2 from assertible/wip-update-loader-utils
Browse files Browse the repository at this point in the history
Upgrade loader-utils - use babel and update file structure
  • Loading branch information
CodyReichert authored Sep 12, 2018
2 parents 69ca40e + e01f050 commit 46a5b09
Show file tree
Hide file tree
Showing 6 changed files with 2,215 additions and 38 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/
lib/
node_modules/
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ $ npm i --save move-file-loader

## Usage

Add a loader (or, _rule_ for Webpack 2) to your Webpack configuration
that describes how and where to move the file. The contents of the
file are returned from the loader.
Add a loader to your Webpack configuration that describes how and
where to move the file. The contents of the file are returned from the
loader.

```js
module.exports = {
...your webpack config,
module: {
loaders: [{
rules: [{
test: /.json/,
/**
* This will move .json files to the [path]/[name].json
* location after being processed by json-loader
*/
loader: "move-file-loader?name=[path][name].json!json"
use: "move-file-loader?name=[path][name].json!json"
}]
},
...the rest of your webpack config
Expand Down
30 changes: 0 additions & 30 deletions index.js

This file was deleted.

Loading

0 comments on commit 46a5b09

Please sign in to comment.