Skip to content
This repository was archived by the owner on Nov 29, 2020. It is now read-only.

Commit 29a496d

Browse files
authored
Merge pull request #263 from PrudhviRaj5/webpack-loaders-config
webpack config changed for url and file loaders
2 parents 6659bf4 + 6c97944 commit 29a496d

File tree

10 files changed

+11402
-36
lines changed

10 files changed

+11402
-36
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
Simple and optimized React boilerplate. It includes:
66

7-
- [x] React 16.1.1
7+
- [x] React 16.2.0
88
- [x] ECMAScript 6 and JSX support
99
- [x] React Router v4
1010
- [x] Component testing using [Enzyme](https://github.com/airbnb/enzyme) and [Jest](https://facebook.github.io/jest)
1111
- [x] Code Coverage
12-
- [x] Latest Webpack (v.3.8.1) and Webpack Dev Server (v.2.9.4) with Scope Hoisting enabled
12+
- [x] Latest Webpack (v.3.9.1) and Webpack Dev Server (v.2.9.5) with Scope Hoisting enabled
1313
- [x] Hot Module Replacement using [react-hot-loader](https://github.com/gaearon/react-hot-loader)
1414
- [x] ES6 linting with continuous linting on file change
1515
- [x] SASS support
30.7 KB
Loading

app/components/App.js

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
import React from 'react';
2+
import img from '../assets/images/react_logo_512x512.png';
23

34
const App = () => {
45
return (
5-
<h2 id="heading">Hello ReactJS</h2>
6+
<div>
7+
<h2 id="heading">Hello ReactJS</h2>
8+
<img
9+
className="image"
10+
style={{ margin: '0.5em' }}
11+
height="40"
12+
width="40"
13+
src={img}
14+
alt="React Logo"
15+
/>
16+
</div>
617
);
718
};
819

config/jest/assetsTransformer.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const path = require('path');
2+
3+
module.exports = {
4+
process(src, filename, config, options) {
5+
return 'module.exports = ' + JSON.stringify(path.basename(filename)) + ';';
6+
},
7+
};

shim.js renamed to config/jest/shim.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
global.requestAnimationFrame = function(callback) {
44
setTimeout(callback, 0);
5-
};
5+
};

0 commit comments

Comments
 (0)