Skip to content

Commit c978bda

Browse files
committed
Use Webpack instead of Rollup
For this I had to remove hot reloading from Webpack, as it doesn’t work in Web Workers.
1 parent 47d63d7 commit c978bda

File tree

8 files changed

+4
-216
lines changed

8 files changed

+4
-216
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
.babel-cache/
22
node_modules/
3-
www/paper.js

client/canvasUtils.js renamed to client/paper/canvasUtils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { forwardProjectionMatrixForPoints, projectPoint } from './utils';
1+
import { forwardProjectionMatrixForPoints, projectPoint } from '../utils';
22

33
// https://beta.observablehq.com/@shaunlebron/texture-drawing-for-html-canvas
44

File renamed without changes.

package-lock.json

Lines changed: 0 additions & 184 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
"dropdb": "dropdb --if-exists paper_programs_development",
1414
"heroku-postbuild": "webpack",
1515
"test": "npm run lint",
16-
"lint": "eslint .",
17-
"rollup": "rollup --config worker.rollup.js"
16+
"lint": "eslint ."
1817
},
1918
"engines": {
2019
"node": "9.3.x",
@@ -66,11 +65,7 @@
6665
"eslint-plugin-react": "^7.7.0",
6766
"nodemon": "^1.17.1",
6867
"prettier": "^1.11.1",
69-
"rollup": "^0.58.0",
70-
"rollup-plugin-commonjs": "^9.1.0",
71-
"rollup-plugin-node-resolve": "^3.3.0",
7268
"webpack-dev-middleware": "^2.0.6",
73-
"webpack-dev-server": "^2.11.2",
74-
"webpack-hot-middleware": "^2.21.2"
69+
"webpack-dev-server": "^2.11.2"
7570
}
7671
}

server/main.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ app.use(api);
1515
if (process.env.NODE_ENV !== 'production') {
1616
const compiler = require('webpack')(require('../webpack.config.js'));
1717
app.use(require('webpack-dev-middleware')(compiler));
18-
app.use(require('webpack-hot-middleware')(compiler));
1918
}
2019

2120
/* eslint-disable no-console */

webpack.config.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
const path = require('path');
2-
const webpack = require('webpack');
32

43
module.exports = {
54
entry: {
65
camera: ['./client/camera/entry.js'],
76
projector: ['./client/projector/entry.js'],
87
editor: ['./client/editor/entry.js'],
8+
paper: ['./client/paper/entry.js'],
99
},
1010
output: {
1111
path: path.join(__dirname, 'www'),
@@ -55,10 +55,3 @@ module.exports = {
5555
]),
5656
],
5757
};
58-
59-
if (process.env.NODE_ENV !== 'production') {
60-
module.exports.plugins.push(new webpack.HotModuleReplacementPlugin());
61-
Object.values(module.exports.entry).forEach(entry => {
62-
entry.unshift('webpack-hot-middleware/client?reload=true');
63-
});
64-
}

worker.rollup.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)