Skip to content

Commit a7d26c6

Browse files
authored
Deprecate loaders (#5294)
* deprecate null-loader for webpack 5 * deprecate mocha-loader * deprecate istanbul-instrumenter-loader * clean up
1 parent a444ae4 commit a7d26c6

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

src/content/loaders/index.mdx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ contributors:
1010
- snitin315
1111
- anshumanv
1212
- jamesgeorge007
13+
- chenxsan
1314
---
1415

1516
webpack enables use of [loaders](/concepts/loaders) to preprocess files. This allows you to bundle any static resource way beyond JavaScript. You can easily write your own loaders using Node.js.
@@ -56,10 +57,6 @@ Loaders are activated by using `loadername!` prefixes in `require()` statements,
5657
- [`postcss-loader`](/loaders/postcss-loader) Loads and transforms a CSS/SSS file using [PostCSS](http://postcss.org)
5758
- [`stylus-loader`](/loaders/stylus-loader/) Loads and compiles a Stylus file
5859

59-
## Testing
60-
61-
- [`mocha-loader`](/loaders/mocha-loader) Tests with [mocha](https://mochajs.org/) (Browser/NodeJS)
62-
6360
## Frameworks
6461

6562
- [`vue-loader`](https://github.com/vuejs/vue-loader) Loads and compiles [Vue Components](https://vuejs.org/v2/guide/components.html)

src/utilities/constants.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ const excludedLoaders = [
2020
'webpack-contrib/raw-loader',
2121
'webpack-contrib/url-loader',
2222
'webpack-contrib/file-loader',
23+
'webpack-contrib/null-loader',
24+
'webpack-contrib/mocha-loader',
25+
'webpack-contrib/istanbul-instrumenter-loader',
2326
];
2427
const excludedPlugins = [
2528
'webpack-contrib/component-webpack-plugin',

webpack.ssg.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ module.exports = (env) =>
9494
'loaders/url-loader': 'https://v4.webpack.js.org/loaders/url-loader',
9595
'loaders/file-loader':
9696
'https://v4.webpack.js.org/loaders/file-loader',
97+
'loaders/null-loader':
98+
'https://v4.webpack.js.org/loaders/null-loader/',
99+
'loaders/mocha-loader':
100+
'https://v4.webpack.js.org/loaders/mocha-loader/',
101+
'loaders/istanbul-instrumenter-loader':
102+
'https://v4.webpack.js.org/loaders/istanbul-instrumenter-loader/',
97103
},
98104
}),
99105
new CopyWebpackPlugin({

0 commit comments

Comments
 (0)