Commit 6e008136 authored by Stefan's avatar Stefan Committed by Ville Immonen
Browse files

Adapt jest and eslint for new default loader scope. (#1077)

Revert webpack prod config comments to not refer to dev server.
parent 7e9cb18a
No related merge requests found
Showing with 8 additions and 11 deletions
+8 -11
......@@ -43,8 +43,7 @@ module.exports = {
settings: {
'import/ignore': [
'node_modules',
'\\.(json|css|ico|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$',
'node_modules'
],
'import/extensions': ['.js'],
'import/resolver': {
......
......@@ -124,7 +124,7 @@ module.exports = {
// A missing `test` is equivalent to a match.
{
exclude: [
/\.(html)$/,
/\.html$/,
/\.(js|jsx)$/,
/\.css$/,
/\.json$/
......
......@@ -124,15 +124,13 @@ module.exports = {
// we need to add the supported extension to this loader too.
// Add one new line in `exclude` for each loader.
//
// "file" loader makes sure those assets get served by WebpackDevServer.
// When you `import` an asset, you get its (virtual) filename.
// In production, they would get copied to the `build` folder.
// "url" loader works like "file" loader except that it embeds assets
// smaller than specified limit in bytes as data URLs to avoid requests.
// A missing `test` is equivalent to a match.
// "file" loader makes sure those assets end up in the `build` folder.
// When you `import` an asset, you get its filename.
// "url" loader works just like "file" loader but it also embeds
// assets smaller than specified size as data URLs to avoid requests.
{
exclude: [
/\.(html)$/,
/\.html$/,
/\.(js|jsx)$/,
/\.css$/,
/\.json$/
......
......@@ -20,7 +20,7 @@ module.exports = (resolve, rootDir, isEjecting) => {
const config = {
collectCoverageFrom: ['src/**/*.{js,jsx}'],
moduleNameMapper: {
'^.+\\.(ico|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': resolve('config/jest/FileStub.js'),
'^.+\\.(?!(js|jsx|css|json)$)[^\\.]+$': resolve('config/jest/FileStub.js'),
'^.+\\.css$': resolve('config/jest/CSSStub.js')
},
setupFiles: [resolve('config/polyfills.js')],
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment