Skip to content

Commit

Permalink
minor changes; Add css-loader
Browse files Browse the repository at this point in the history
  • Loading branch information
kcgidw committed Feb 14, 2019
1 parent 958d6b6 commit f71a992
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
"constructor-super": "warn",
"valid-typeof": "warn",
"no-dupe-keys": "warn",
"semi": "warn"
"semi": "warn",
"comma-dangle": ["warn", {
"arrays": "ignore",
"objects": "ignore"
}]
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"async": "^2.6.1",
"babel-eslint": "^10.0.1",
"chai": "^4.2.0",
"css-loader": "^2.1.0",
"eslint-plugin-vue": "^5.1.0",
"mocha": "^5.2.0",
"vue": "^2.5.21"
Expand Down
4 changes: 2 additions & 2 deletions src/server/socket-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const GameError = require('./game-error');
function handleSockets(io) {
io.on('connection', function(sock) {
if(process.env.NODE_ENV !== 'production') {
console.log('Socket conncted: ' + sock.id);
console.log('Socket connected: ' + sock.id);
}
Object.keys(MessageHandlers).forEach((messageName) => {
sock.on(messageName, function(data) {
Expand Down Expand Up @@ -177,7 +177,7 @@ function joinRoom(user, room, rejoin, isHost = false) {
console.log(`User ${user.name} rejoined room-${room.roomCode}`);
} else {
room.addUser(user, isHost);
console.log(`User ${user.name} joined room-${room.roomCode}. Users: ${room.users.length}`);
console.log(`User ${user.name} joined room-${room.roomCode}. Room users: ${room.users.length}`);
}
user.socket.join(room.roomCode);
user.setGameRoom(room);
Expand Down
13 changes: 10 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,16 @@ module.exports = (env) => {
options: {
presets: ['@babel/preset-env']
}
}
},
]
}
},
{
test: /\.css$/,
use: [
'vue-style-loader',
'css-loader',
]
},
],
},
resolve: {
Expand All @@ -48,7 +55,7 @@ module.exports = (env) => {
stats: 'minimal',
optimization: {
minimize: true,
minimizer: [new UglifyJsPlugin({sourceMap: true})]
minimizer: [new UglifyJsPlugin({sourceMap: true}),]
},
externals: {
'vue': 'Vue', // importing 'vue' to resolve to external cdn
Expand Down

0 comments on commit f71a992

Please sign in to comment.