Frontend: Upgrade webpack, babel, eslint, postcss, and sass

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer 2021-07-26 00:05:50 +02:00
parent 0c42ded320
commit 5076af2979
3 changed files with 598 additions and 616 deletions

File diff suppressed because it is too large Load diff

View file

@ -20,20 +20,20 @@
"gettext-compile": "gettext-compile --output src/locales/translations.json src/locales/*.po"
},
"dependencies": {
"@babel/cli": "^7.14.5",
"@babel/core": "^7.14.6",
"@babel/cli": "^7.14.8",
"@babel/core": "^7.14.8",
"@babel/eslint-parser": "^7.14.7",
"@babel/plugin-proposal-class-properties": "^7.14.5",
"@babel/plugin-proposal-object-rest-spread": "^7.14.7",
"@babel/plugin-transform-runtime": "^7.14.5",
"@babel/polyfill": "^7.12.1",
"@babel/preset-env": "^7.14.7",
"@babel/preset-env": "^7.14.8",
"@babel/register": "^7.14.5",
"@babel/runtime": "^7.14.6",
"@babel/runtime": "^7.14.8",
"@lcdp/offline-plugin": "^5.1.0",
"@vvo/tzdb": "^6.7.0",
"axios": "^0.21.1",
"axios-mock-adapter": "^1.19.0",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.2.2",
"babel-plugin-istanbul": "^6.0.0",
"browserslist": "^4.16.6",
@ -44,18 +44,18 @@
"css-loader": "^5.2.6",
"cssnano": "^5.0.6",
"easygettext": "^2.17.0",
"eslint": "^7.30.0",
"eslint": "^7.31.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-standard": "^16.0.3",
"eslint-formatter-pretty": "^4.1.0",
"eslint-friendly-formatter": "^4.0.1",
"eslint-loader": "^4.0.2",
"eslint-plugin-html": "^6.1.2",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier-vue": "^3.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-vue": "^7.13.0",
"eslint-webpack-plugin": "^3.0.1",
"eventsource-polyfill": "^0.9.6",
"file-loader": "^6.2.0",
"file-saver": "^2.0.5",
@ -76,7 +76,7 @@
"mocha": "^9.0.2",
"node-storage-shim": "^2.0.1",
"photoswipe": "^4.1.3",
"postcss": "^8.3.5",
"postcss": "^8.3.6",
"postcss-browser-reporter": "^0.6.0",
"postcss-import": "^14.0.2",
"postcss-loader": "^6.1.1",
@ -87,7 +87,7 @@
"pubsub-js": "^1.9.3",
"regenerator-runtime": "^0.13.7",
"resolve-url-loader": "^3.1.4",
"sass": "^1.35.2",
"sass": "^1.36.0",
"sass-loader": "^12.1.0",
"server": "^1.0.34",
"sockette": "^2.0.6",
@ -108,7 +108,7 @@
"vue-template-compiler": "^2.6.14",
"vue2-filters": "^0.13.0",
"vuetify": "^1.5.24",
"webpack": "^5.45.1",
"webpack": "^5.46.0",
"webpack-bundle-analyzer": "^4.4.2",
"webpack-cli": "^4.7.2",
"webpack-hot-middleware": "^2.25.0",

View file

@ -30,6 +30,7 @@ https://docs.photoprism.org/developer-guide/
const path = require("path");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const ESLintPlugin = require("eslint-webpack-plugin");
const OfflinePlugin = require("@lcdp/offline-plugin");
const webpack = require("webpack");
const isDev = process.env.NODE_ENV !== "production";
@ -92,20 +93,6 @@ const config = {
},
module: {
rules: [
{
test: /\.js$/,
include: PATHS.app,
exclude: /node_modules/,
enforce: "pre",
use: [
{
loader: "eslint-loader",
options: {
formatter: require("eslint-formatter-pretty"),
},
},
],
},
{
test: /\.vue$/,
include: PATHS.js,
@ -264,6 +251,13 @@ if (isDev) {
});
config.plugins.push(devToolPlugin);
const esLintPlugin = new ESLintPlugin({
formatter: require("eslint-formatter-pretty"),
extensions: ["js"],
});
config.plugins.push(esLintPlugin);
}
module.exports = config;