Webpack fixes
This commit is contained in:
887
client/package-lock.json
generated
887
client/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,8 @@
|
||||
"main": "dist/app.js",
|
||||
"scripts": {
|
||||
"tsc": "tsc -w",
|
||||
"build": "webpack"
|
||||
"build": "webpack",
|
||||
"start": "webpack serve --watch"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -23,9 +24,7 @@
|
||||
"express": "^4.17.1",
|
||||
"p5": "^1.2.0",
|
||||
"socket.io": "^3.1.0",
|
||||
"socket.io-client": "^3.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"socket.io-client": "^3.1.0",
|
||||
"@types/express": "^4.17.11",
|
||||
"@types/p5": "^0.9.1",
|
||||
"@types/socket.io": "^2.1.13",
|
||||
@@ -34,5 +33,6 @@
|
||||
"webpack": "^5.19.0",
|
||||
"webpack-cli": "^4.4.0",
|
||||
"webpack-dev-server": "^3.11.2"
|
||||
}
|
||||
},
|
||||
"devDependencies": {}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
/*! p5.js v1.2.0 December 19, 2020 */
|
||||
File diff suppressed because one or more lines are too long
@@ -4,7 +4,8 @@ module.exports = {
|
||||
entry: './src/app.ts',
|
||||
output: {
|
||||
filename: 'bundle.js',
|
||||
path: path.resolve(__dirname, 'static/assets')
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
publicPath: 'dist',
|
||||
},
|
||||
devtool: 'inline-source-map',
|
||||
module: {
|
||||
|
||||
@@ -87,6 +87,7 @@ const players = new Players()
|
||||
app.use(cors())
|
||||
|
||||
app.use(express.static(path.join(__dirname, '/../../client/static/assets')))
|
||||
app.use(express.static(path.join(__dirname, '/../../client/dist')))
|
||||
|
||||
app.get('/', function(req, res) {
|
||||
res.sendFile('index.html', { root: __dirname + '/../../client/static/'});
|
||||
|
||||
Reference in New Issue
Block a user