update
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"build": "vite build",
|
||||
"dev": "vite",
|
||||
"dev": "vite"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
|
||||
BIN
dashboard/public/favicon16.png
Normal file
BIN
dashboard/public/favicon16.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 555 B |
BIN
dashboard/public/favicon32.png
Normal file
BIN
dashboard/public/favicon32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
dashboard/public/favicon64.png
Normal file
BIN
dashboard/public/favicon64.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
@@ -1,7 +1,8 @@
|
||||
import {defineConfig} from "vite";
|
||||
|
||||
export default defineConfig({
|
||||
base: "/climate/static",
|
||||
build: {
|
||||
outDir: '../app-dist/static',
|
||||
outDir: "../dist",
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
const path = require("path");
|
||||
const webpack = require("webpack");
|
||||
const config = require("./src/config.json");
|
||||
|
||||
const TerserWebpackPlugin = require("terser-webpack-plugin");
|
||||
|
||||
const webpackConfig = {
|
||||
mode: "development",
|
||||
entry: "./src/main.ts",
|
||||
plugins: [new webpack.ProgressPlugin()],
|
||||
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.(ts|tsx)$/,
|
||||
loader: "ts-loader",
|
||||
include: [path.resolve(__dirname, "src")],
|
||||
exclude: [/node_modules/]
|
||||
},
|
||||
{
|
||||
test: /.css$/,
|
||||
|
||||
use: [{
|
||||
loader: "style-loader"
|
||||
}, {
|
||||
loader: "css-loader",
|
||||
options: {
|
||||
sourceMap: true
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
test: /\.(png|jpe?g|gif|ttf|woff2?|eot|svg)$/i,
|
||||
use: [
|
||||
{
|
||||
loader: "file-loader",
|
||||
},
|
||||
],
|
||||
}]
|
||||
},
|
||||
|
||||
resolve: {
|
||||
extensions: [".tsx", ".ts", ".js"]
|
||||
},
|
||||
|
||||
output: {
|
||||
filename: "dashboard.js",
|
||||
path: path.resolve(__dirname, "../app-dist/static/"),
|
||||
},
|
||||
|
||||
devServer: {
|
||||
contentBase: path.join(__dirname, "../app-dist/static/"),
|
||||
contentBasePublicPath: "/",
|
||||
port: 3000,
|
||||
publicPath: "http://localhost:3000/",
|
||||
hotOnly: true
|
||||
},
|
||||
};
|
||||
|
||||
if (!config.development) {
|
||||
webpackConfig.optimization = {
|
||||
minimizer: [new TerserWebpackPlugin()],
|
||||
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
vendors: {
|
||||
priority: -10,
|
||||
test: /[\\/]node_modules[\\/]/
|
||||
}
|
||||
},
|
||||
|
||||
chunks: "async",
|
||||
minChunks: 1,
|
||||
minSize: 30000,
|
||||
name: false
|
||||
}
|
||||
};
|
||||
webpackConfig.mode = "production";
|
||||
}
|
||||
|
||||
module.exports = {...webpackConfig};
|
||||
Reference in New Issue
Block a user