Skip to content

Commit 8054a53

Browse files
authored
Update to webpack 4 (processing#1145)
* remove some of the react errors, start to fix webpack HMR errors * start upgrade to webpack 4 * more stuff to update webpack * update webpack configs to work with webpack 4 * remove linting from truncate script
1 parent 68c1e48 commit 8054a53

File tree

16 files changed

+6748
-4434
lines changed

16 files changed

+6748
-4434
lines changed

.babelrc

+5
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@
4545
"@babel/preset-env",
4646
"@babel/preset-react"
4747
]
48+
},
49+
"development": {
50+
"plugins": [
51+
"react-hot-loader/babel"
52+
]
4853
}
4954
},
5055
"plugins": [

client/index.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { render } from 'react-dom';
3-
import { hot } from 'react-hot-loader';
3+
import { hot } from 'react-hot-loader/root';
44
import { Provider } from 'react-redux';
55
import { Router, browserHistory } from 'react-router';
66
import configureStore from './store';
@@ -22,7 +22,7 @@ const App = () => (
2222
</Provider>
2323
);
2424

25-
const HotApp = hot(module)(App);
25+
const HotApp = hot(App);
2626

2727
render(
2828
<HotApp />,

client/modules/IDE/components/Editor.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ Editor.propTypes = {
363363
content: PropTypes.string.isRequired,
364364
id: PropTypes.string.isRequired,
365365
fileType: PropTypes.string.isRequired,
366-
url: PropTypes.string.isRequired
366+
url: PropTypes.string
367367
}).isRequired,
368368
editorOptionsVisible: PropTypes.bool.isRequired,
369369
showEditorOptions: PropTypes.func.isRequired,

client/modules/IDE/reducers/ide.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ const initialState = {
1010
projectOptionsVisible: false,
1111
newFolderModalVisible: false,
1212
shareModalVisible: false,
13-
shareModalProjectId: null,
14-
shareModalProjectName: null,
15-
shareModalProjectUsername: null,
13+
shareModalProjectId: 'abcd',
14+
shareModalProjectName: 'My Cute Sketch',
15+
shareModalProjectUsername: 'p5_user',
1616
sketchlistModalVisible: false,
1717
editorOptionsVisible: false,
1818
keyboardShortcutVisible: false,

client/modules/User/actions.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ export function getUser() {
8484
});
8585
})
8686
.catch((response) => {
87-
dispatch(authError(response.data.error));
87+
const message = response.message || response.data.error;
88+
dispatch(authError(message));
8889
});
8990
};
9091
}

index.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
if (process.env.NODE_ENV === 'production') {
22
process.env.webpackAssets = JSON.stringify(require('./dist/static/manifest.json'));
3-
process.env.webpackChunkAssets = JSON.stringify(require('./dist/static/chunk-manifest.json'));
43
require('./dist/server.bundle.js');
54
} else {
65
let parsed = require('dotenv').config();

0 commit comments

Comments
 (0)