zoukankan      html  css  js  c++  java
  • vue

    vue.config.js

    const name = defaultSettings.title || ""; // page title
    //添加版本号  此处用时间戳
    const Timestamp = new Date().getTime();
    
    // 处理 css 时  引入MiniCssExtractPlugin
    const MiniCssExtractPlugin = require("mini-css-extract-plugin");
    
    configureWebpack: {
        // provide the app's title in webpack's name field, so that
        // it can be accessed in index.html to inject the correct title.
        name: name,
        resolve: {
          alias: {
            "@": resolve("src")
          }
        },
        plugins: [
          new MiniCssExtractPlugin({
            // 修改打包后css文件名
            filename: `static/css/[name].${Timestamp}.css`,
            chunkFilename: `static/css/[name].${Timestamp}.css`
          })
        ],
        output: {
          // 输出重构  打包编译后的 文件名称  【模块名称.版本号.时间戳】
          filename: `static/js/[name].${Timestamp}.js`,
          chunkFilename: `static/js/[name].${Timestamp}.js`
        }
      },
    
  • 相关阅读:
    Java 日志
    编写用例文档
    uml用例关系
    地址线和数据线
    Android总结
    DbUtil数据库连接
    PropertiesUtil
    log4j.properties配置
    自定义博客样式
    css给文字加下划线
  • 原文地址:https://www.cnblogs.com/gggggggxin/p/14179993.html
Copyright © 2011-2022 走看看