Skip to content
This repository has been archived by the owner on Apr 20, 2021. It is now read-only.

Commit

Permalink
Update WebPack's test regexps to match only js and jsx files
Browse files Browse the repository at this point in the history
There is missing "end of string" in webpack's test regular expression. This
leads to testing also .json files (and any other file containing ".js" anywhere
in the string). See gatsbyjs/gatsby#10038 for one example of issue.
  • Loading branch information
kepi authored and emilgoldsmith committed Dec 14, 2018
1 parent 449fa86 commit fb6bc7a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ If you are for example using [Styled Components](https://www.styled-components.c
module: {
rules: [
{
test: /\.jsx?/,
test: /\.jsx?$/,
loader: 'stylelint-custom-processor-loader',
exclude: /node_modules/,
},
Expand All @@ -58,7 +58,7 @@ And you should now have linting your Styled Components css integrated with Webpa
module: {
rules: [
{
test: /\.jsx?/,
test: /\.jsx?$/,
use: [
'babel-loader',
'stylelint-custom-processor-loader',
Expand All @@ -77,7 +77,7 @@ Give the path to a non-default named Stylelint config. The recommended way to sp
module: {
rules: [
{
test: /\.jsx?/,
test: /\.jsx?$/,
use: [
'babel-loader',
{
Expand Down

0 comments on commit fb6bc7a

Please sign in to comment.