Skip to content

Commit 0040572

Browse files
authored
Remove JSON loader
This is no longer required in webpack 2, JSON files are loaded by default.
1 parent 2ef7602 commit 0040572

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

content/guides/author-libraries.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -93,24 +93,6 @@ module.exports = {
9393

9494
This adds basic configuration to bundle the library.
9595

96-
### Add Loaders
97-
98-
But it will not work without adding relevant loaders for transpiling the code.
99-
Here, we need a [`json-loader`](https://github.com/webpack/json-loader) is required to precompile our json fixture file.
100-
101-
__webpack.config.js__
102-
103-
```javascript
104-
module.exports = {
105-
// ...
106-
module: {
107-
rules: [{
108-
test: /.json$/,
109-
use: 'json-loader'
110-
}]
111-
}
112-
};
113-
```
11496
### Add `externals`
11597

11698
Now, if you run `webpack`, you will find that a largish bundle file is created. If you inspect the file, you will find that lodash has been bundled along with your code.

0 commit comments

Comments
 (0)