Skip to content
This repository was archived by the owner on Dec 3, 2024. It is now read-only.
/ webgm Public archive
forked from luizzeroxis/webgm

Commit 8bd5977

Browse files
committed
Small dev changes
1 parent ac61354 commit 8bd5977

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"license": "GPL-3.0-or-later",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1",
8-
"lint": "eslint --ignore-path .gitignore .",
8+
"lint": "eslint --ignore-path .gitignore src",
99
"stylelint": "npx stylelint \"**/*.scss\"",
1010
"start": "webpack serve --open --config webpack.dev.js",
1111
"build": "webpack --config webpack.prod.js",

src/editor/Editor.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ export default class Editor {
2626
constructor() {
2727
if ("serviceWorker" in navigator) {
2828
window.addEventListener("load", () => {
29-
navigator.serviceWorker.register("service-worker.js");
29+
navigator.serviceWorker.register("service-worker.js")
30+
.catch(() => {
31+
//
32+
});
3033
});
3134
}
3235

webpack.common.js

-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
const path = require("path");
44

5-
const ESLintPlugin = require("eslint-webpack-plugin");
65
const {GitRevisionPlugin} = require("git-revision-webpack-plugin");
76
const HtmlWebpackPlugin = require("html-webpack-plugin");
87
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
@@ -81,9 +80,6 @@ module.exports = {
8180
"LASTCOMMITDATETIME": JSON.stringify(gitRevisionPlugin.lastcommitdatetime()),
8281
},
8382
}),
84-
new ESLintPlugin({
85-
files: path.resolve(__dirname, "."),
86-
}),
8783
new HtmlWebpackPlugin({
8884
title: "webgm",
8985
excludeChunks: ["main-game"],

webpack.dev.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-env node, commonjs */
22

3+
const ESLintPlugin = require("eslint-webpack-plugin");
34
const path = require("path");
4-
55
const {mergeWithRules} = require("webpack-merge");
66

77
const common = require("./webpack.common.js");
@@ -44,4 +44,9 @@ module.exports = mergeWithRules({
4444
},
4545
},
4646
devtool: "inline-source-map",
47+
plugins: [
48+
new ESLintPlugin({
49+
files: path.resolve(__dirname, "."),
50+
})
51+
],
4752
});

0 commit comments

Comments
 (0)