Skip to content

Commit 5eeffe4

Browse files
committed
Chore: loaders → rules for webpack 2
1 parent c39ba15 commit 5eeffe4

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

docs/API.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const styleguide = styleguidist({
1212
components: './lib/components/**/*.js',
1313
webpackConfig: {
1414
module: {
15-
loaders: [
15+
rules: [
1616
{
1717
test: /\.jsx?$/,
1818
exclude: /node_modules/,

docs/Configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ module.exports = {
403403
resolve: {
404404
extensions: ['.es6']
405405
},
406-
loaders: [
406+
rules: [
407407
{
408408
test: /\.scss$/,
409409
loaders: ['style-loader', 'css-loader', 'sass-loader?precision=10']

docs/Webpack.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Add a `webpackConfig` section to your `styleguide.config.js`:
4949
module.exports = {
5050
webpackConfig: {
5151
module: {
52-
loaders: [
52+
rules: [
5353
// Babel loader, will use your project’s .babelrc
5454
{
5555
test: /\.jsx?$/,

examples/webpack/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = {
77
path: path.resolve(__dirname, 'build'),
88
},
99
module: {
10-
loaders: [
10+
rules: [
1111
{
1212
test: /\.(js|jsx)$/,
1313
include: path.resolve(__dirname, 'src'),

scripts/__tests__/config.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ it('should return webpackConfig with user webpack config', () => {
165165
expect(result.webpackConfig).toEqual(
166166
expect.objectContaining({
167167
module: {
168-
loaders: expect.any(Array),
168+
rules: expect.any(Array),
169169
},
170170
})
171171
);

test/apps/basic/styleguide.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = {
88
components: './components/**/[A-Z]*.js',
99
webpackConfig: {
1010
module: {
11-
loaders: [
11+
rules: [
1212
{
1313
test: /\.jsx?$/,
1414
include: dir,

test/data/styleguide.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = {
88
components: './components/**/[A-Z]*.js',
99
webpackConfig: {
1010
module: {
11-
loaders: [
11+
rules: [
1212
{
1313
test: /\.jsx?$/,
1414
include: dir,

test/run.server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ styleguidist({
99
components: path.resolve(dir, 'components/**/[A-Z]*.js'),
1010
webpackConfig: {
1111
module: {
12-
loaders: [
12+
rules: [
1313
{
1414
test: /\.jsx?$/,
1515
include: dir,

0 commit comments

Comments
 (0)