3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-14 21:31:50 +00:00

fix: update dashboard packages, fix build on Node.js 18

This commit is contained in:
Dragory 2023-06-24 09:21:06 +00:00
parent fd4097cefc
commit 1e5378a274
6 changed files with 3917 additions and 6135 deletions

File diff suppressed because it is too large Load diff

View file

@ -10,46 +10,45 @@
"watch-build": "rimraf dist && NODE_ENV=development webpack --config webpack.config.js --watch"
},
"devDependencies": {
"@babel/core": "^7.7.2",
"@babel/preset-env": "^7.7.1",
"@babel/preset-typescript": "^7.7.2",
"babel-loader": "^8.0.6",
"cross-env": "^5.2.0",
"css-loader": "^3.2.0",
"@babel/core": "^7.22.5",
"@babel/preset-env": "^7.22.5",
"@babel/preset-typescript": "^7.22.5",
"babel-loader": "^9.1.2",
"cross-env": "^7.0.3",
"css-loader": "^6.8.1",
"cssnano": "^4.1.10",
"dotenv-webpack": "^1.7.0",
"file-loader": "^4.2.0",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^4.0.0-beta.8",
"postcss-import": "^12.0.1",
"postcss-loader": "^3.0.0",
"postcss-nesting": "^7.0.1",
"postcss-preset-env": "^6.7.0",
"source-map-loader": "^0.2.4",
"dotenv-webpack": "^8.0.1",
"file-loader": "^6.2.0",
"html-loader": "^4.2.0",
"html-webpack-plugin": "^5.5.3",
"postcss-import": "^15.1.0",
"postcss-loader": "^7.3.3",
"postcss-nesting": "^11.3.0",
"postcss-preset-env": "^8.5.1",
"source-map-loader": "^4.0.1",
"tailwindcss": "^1.9.6",
"ts-loader": "^6.2.0",
"typescript": "^4.1.3",
"vue-loader": "^15.7.1",
"vue-style-loader": "^4.1.2",
"vue-template-compiler": "^2.6.10",
"webpack": "^4.41.0",
"webpack-cli": "^3.3.9",
"webpack-dev-server": "^3.8.2",
"webpack-merge": "^4.2.2"
"ts-loader": "^9.4.3",
"vue-loader": "^15.10.1",
"vue-style-loader": "^4.1.3",
"vue-template-compiler": "^2.7.14",
"webpack": "^5.88.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
},
"dependencies": {
"highlight.js": "^9.15.10",
"@highlightjs/vue-plugin": "^1.0.2",
"highlight.js": "^11.8.0",
"humanize-duration": "^3.27.0",
"js-yaml": "^3.13.1",
"marked": "^0.7.0",
"modern-css-reset": "^1.0.4",
"moment": "^2.29.1",
"vue": "^2.6.10",
"vue-highlightjs": "git://github.com/Dragory/vue-highlightjs.git#pass-hljs-instance",
"js-yaml": "^4.1.0",
"marked": "^5.1.0",
"modern-css-reset": "^1.4.0",
"moment": "^2.29.4",
"vue": "^2.7.14",
"vue-material-design-icons": "^4.1.0",
"vue-router": "^3.0.6",
"vue2-ace-editor": "0.0.14",
"vuex": "^3.1.1"
"vue-router": "^3.6.5",
"vue2-ace-editor": "^0.0.15",
"vuex": "^3.6.2"
},
"browserslist": [
"last 2 Chrome versions"

View file

@ -3,7 +3,7 @@
</template>
<script>
import marked from "marked";
import { marked } from "marked";
import hljs from "highlight.js";
export default {

View file

@ -2,10 +2,10 @@ import "./style/app.pcss";
import Vue from "vue";
import hljs from "highlight.js/lib/highlight.js";
import VueHighlightJS from "@highlightjs/vue-plugin";
import hljs from "highlight.js/lib/core";
import hljsYaml from "highlight.js/lib/languages/yaml.js";
import "highlight.js/styles/ocean.css";
import VueHighlightJS from "vue-highlightjs";
import "highlight.js/styles/base16/ocean.css";
import { router } from "./routes";
import { RootStore } from "./store";

View file

@ -21,4 +21,8 @@ module.exports = {
},
variants: {},
plugins: [],
purge: ["./src/**/*.{html,vue}"],
future: {
purgeLayersByDefault: true,
},
};

View file

@ -1,8 +1,8 @@
const path = require("path");
const VueLoaderPlugin = require("vue-loader/lib/plugin");
const { VueLoaderPlugin } = require("vue-loader");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const DotenvPlugin = require("dotenv-webpack");
const merge = require("webpack-merge");
const { merge } = require("webpack-merge");
const webpack = require("webpack");
const targetDir = path.normalize(path.join(__dirname, "dist"));
@ -28,10 +28,28 @@ const pathAliases = Object.entries(tsconfig.compilerOptions.paths || []).reduce(
return aliases;
}, {});
const postcssPlugins = [
require("postcss-import")({
resolve(id, base, options) {
// Since WebStorm doesn't resolve imports from node_modules without a tilde (~) prefix,
// strip the tilde here to get the best of both worlds (webstorm support + postcss-import support)
if (id[0] === "~") id = id.slice(1);
// Call the original resolver after stripping the tilde
return require("postcss-import/lib/resolve-id")(id, base, options);
},
}),
require("postcss-nesting")(),
require("tailwindcss")(),
];
if (process.env.NODE_ENV === "production") {
postcssPlugins.push(require("postcss-preset-env")(), require("cssnano")());
}
let config = {
entry: "./src/main.ts",
output: {
filename: "[name].[hash].js",
filename: "[name].[fullhash].js",
path: targetDir,
publicPath: "/",
},
@ -86,27 +104,9 @@ let config = {
{
loader: "postcss-loader",
options: {
ident: "postcss",
plugins: (loader) => {
const plugins = [
require("postcss-import")({
resolve(id, base, options) {
// Since WebStorm doesn't resolve imports from node_modules without a tilde (~) prefix,
// strip the tilde here to get the best of both worlds (webstorm support + postcss-import support)
if (id[0] === "~") id = id.slice(1);
// Call the original resolver after stripping the tilde
return require("postcss-import/lib/resolve-id")(id, base, options);
},
}),
require("postcss-nesting")(),
require("tailwindcss")(),
];
if (process.env.NODE_ENV === "production") {
plugins.push(require("postcss-preset-env")(), require("cssnano")());
}
return plugins;
// ident: "postcss",
postcssOptions: {
plugins: postcssPlugins,
},
},
},
@ -131,12 +131,9 @@ let config = {
{
loader: "html-loader",
options: {
root: path.resolve(__dirname, "src"),
attrs: ["img:src", "link:href"],
esModule: false,
...(process.env.NODE_ENV === "production" && {
minimize: true,
removeComments: true,
collapseWhitespace: true,
}),
},
},
@ -160,6 +157,7 @@ let config = {
resolve: {
extensions: [".ts", ".tsx", ".js", ".mjs", ".vue"],
alias: pathAliases,
roots: [path.resolve(__dirname, "src")],
},
};