11 2024 档案
手写单页面应用路由
摘要:hash模式 <html> <head> <meta charset="UTF-8"> <title>Hash</title> <style> .nav_container { display: grid; justify-content: center; width: 100%; height:
Vite去除生产环境console.log
摘要:vite.config.js中配置esbuild import { fileURLToPath, URL } from 'node:url' import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' export
代码压缩
摘要:webpack+Terser 代码压缩 // webpack.config.js const TerserPlugin = require('terser-webpack-plugin'); const OptimizeCSSAssetsPlugin = require('optimize-css-