Skip to content
This repository was archived by the owner on Dec 22, 2020. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ $ npm install json5-loader --save-dev

You can use the loader either:

- by configuring the `json5-loader` in the `module.loaders` object of the webpack configuration, or
- by configuring the `json5-loader` in the `module.rules` object of the webpack configuration, or
- by directly using the `json5-loader!` prefix to the require statement.

Suppose we have the following `json5` file:
Expand All @@ -44,7 +44,7 @@ Suppose we have the following `json5` file:
}
```

### Usage with preconfigured loader
### Usage with preconfigured rule

**webpack.config.js**

Expand All @@ -56,11 +56,12 @@ module.exports = {
/* ... */
},
module: {
loaders: [
rules: [
{
// make all files ending in .json5 use the `json5-loader`
test: /\.json5$/,
loader: 'json5-loader',
use: 'json5-loader',
type: 'javascript/auto'
},
],
},
Expand Down