Skip to content

Commit f339b4c

Browse files
committed
fixes webpack configurations and dependency lists
- adds source map to development bundle - adds inline source map to production bundle - removes react from production bundle - removes react and react-dom from dependencies - adds react and react-dom as devDependencies and peerDependencies
1 parent 45bcb2b commit f339b4c

6 files changed

+19
-39
lines changed

dist/build.bundle.js

+2-27
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/build.bundle.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@trbl/react-css-grid",
3-
"version": "0.0.4",
3+
"version": "0.0.5",
44
"main": "dist/build.bundle.js",
55
"repository": "[email protected]:trouble/react-css-grid.git",
66
"description": "A grid for React projects, based on CSS Grid Layout.",
@@ -21,14 +21,13 @@
2121
"test": "jest"
2222
},
2323
"peerDependencies": {
24-
"react": "^16.8.0"
24+
"react": "^16.8.0",
25+
"react-dom": "^16.8.0"
2526
},
2627
"dependencies": {
27-
"@trbl/react-html-element": "^1.0.1",
28+
"@trbl/react-html-element": "^1.0.3",
2829
"minify-css-string": "^1.0.0",
29-
"prop-types": "^15.7.2",
30-
"react": "^16.12.0",
31-
"react-dom": "^16.12.0"
30+
"prop-types": "^15.7.2"
3231
},
3332
"devDependencies": {
3433
"@babel/core": "^7.8.4",
@@ -52,6 +51,8 @@
5251
"husky": "^4.2.1",
5352
"jest": "^25.1.0",
5453
"lint-staged": "^10.0.6",
54+
"react": "^16.12.0",
55+
"react-dom": "^16.12.0",
5556
"react-hot-loader": "^4.12.19",
5657
"webpack": "^4.41.5",
5758
"webpack-cli": "^3.3.10",

webpack.development.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const path = require('path');
22
const HtmlWebPackPlugin = require('html-webpack-plugin');
33

44
module.exports = {
5+
devtool: 'inline-source-map',
56
mode: 'development',
67
entry: './demo/index.js',
78
output: {

webpack.production.config.js

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const path = require('path');
22

33
module.exports = {
4+
devtool: 'source-map',
45
mode: 'production',
56
entry: './src/index.js',
67
output: {
@@ -17,4 +18,7 @@ module.exports = {
1718
},
1819
],
1920
},
21+
externals: {
22+
react: 'react',
23+
},
2024
};

yarn.lock

+4-6
Original file line numberDiff line numberDiff line change
@@ -1112,14 +1112,12 @@
11121112
object.assign "^4.1.0"
11131113
object.entries "^1.1.1"
11141114

1115-
"@trbl/react-html-element@^1.0.1":
1116-
version "1.0.1"
1117-
resolved "https://registry.yarnpkg.com/@trbl/react-html-element/-/react-html-element-1.0.1.tgz#d8936ad47f64b91257a331789eaf73c324182045"
1118-
integrity sha512-I6qU3n9fxLS1TRgF0lQuYA+c6GEcOFNFzyTxy1Voz0B9JsIIFB/1Ky+H/rADfDfRgKSVxoZ0fLAN0zqoE/YwKA==
1115+
"@trbl/react-html-element@^1.0.3":
1116+
version "1.0.3"
1117+
resolved "https://registry.yarnpkg.com/@trbl/react-html-element/-/react-html-element-1.0.3.tgz#5ebd8ff70763b8f49c7a2e5da9abf1e6a7530c17"
1118+
integrity sha512-RxESgsj4Sg7czeB3HzLqBw11wWLuXpy7/S0WyHpOIviw1JlxOK1HCEEMHLHgwwkLChmrESIxEVqzdeZq3VOp8w==
11191119
dependencies:
11201120
prop-types "^15.7.2"
1121-
react "^16.12.0"
1122-
react-dom "^16.12.0"
11231121

11241122
"@types/babel__core@^7.1.0":
11251123
version "7.1.3"

0 commit comments

Comments
 (0)