Skip to content

Commit

Permalink
Update to webpack 4 (processing#1145)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
catarak authored Aug 28, 2019
1 parent 68c1e48 commit 8054a53
Show file tree
Hide file tree
Showing 16 changed files with 6,748 additions and 4,434 deletions.
5 changes: 5 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@
"@babel/preset-env",
"@babel/preset-react"
]
},
"development": {
"plugins": [
"react-hot-loader/babel"
]
}
},
"plugins": [
Expand Down
4 changes: 2 additions & 2 deletions client/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { render } from 'react-dom';
import { hot } from 'react-hot-loader';
import { hot } from 'react-hot-loader/root';
import { Provider } from 'react-redux';
import { Router, browserHistory } from 'react-router';
import configureStore from './store';
Expand All @@ -22,7 +22,7 @@ const App = () => (
</Provider>
);

const HotApp = hot(module)(App);
const HotApp = hot(App);

render(
<HotApp />,
Expand Down
2 changes: 1 addition & 1 deletion client/modules/IDE/components/Editor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ Editor.propTypes = {
content: PropTypes.string.isRequired,
id: PropTypes.string.isRequired,
fileType: PropTypes.string.isRequired,
url: PropTypes.string.isRequired
url: PropTypes.string
}).isRequired,
editorOptionsVisible: PropTypes.bool.isRequired,
showEditorOptions: PropTypes.func.isRequired,
Expand Down
6 changes: 3 additions & 3 deletions client/modules/IDE/reducers/ide.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ const initialState = {
projectOptionsVisible: false,
newFolderModalVisible: false,
shareModalVisible: false,
shareModalProjectId: null,
shareModalProjectName: null,
shareModalProjectUsername: null,
shareModalProjectId: 'abcd',
shareModalProjectName: 'My Cute Sketch',
shareModalProjectUsername: 'p5_user',
sketchlistModalVisible: false,
editorOptionsVisible: false,
keyboardShortcutVisible: false,
Expand Down
3 changes: 2 additions & 1 deletion client/modules/User/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ export function getUser() {
});
})
.catch((response) => {
dispatch(authError(response.data.error));
const message = response.message || response.data.error;
dispatch(authError(message));
});
};
}
Expand Down
1 change: 0 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
if (process.env.NODE_ENV === 'production') {
process.env.webpackAssets = JSON.stringify(require('./dist/static/manifest.json'));
process.env.webpackChunkAssets = JSON.stringify(require('./dist/static/chunk-manifest.json'));
require('./dist/server.bundle.js');
} else {
let parsed = require('dotenv').config();
Expand Down
Loading

0 comments on commit 8054a53

Please sign in to comment.