leefly
V2EX  ›  Node.js

怎么修改 php 中 引入的 css js 文件的 hash

  •  
  •   leefly · May 23, 2016 · 3115 views
    This topic created in 3816 days ago, the information mentioned may be changed or developed.
    4 replies  •  2016-05-23 16:05:00 +08:00
    garrydzeng
    garrydzeng
    May 23, 2016
    1
    通过某个函数 /方法输出文件名, 例如: `<script src="<?= asset('/assets/index.css') ?>"></script>`?
    leefly
    leefly
    OP
    May 23, 2016
    2
    @garrydzeng 是 Webpack 打包之后生成的 hash 😳
    adeweb
    adeweb
    May 23, 2016
    3
    webpack 打包时文件 hash 写入到一个 php 文件(用 php 语法,写成数组啥的)
    garrydzeng
    garrydzeng
    May 23, 2016
    4
    @leefly 如果不想要 hash 的话, 把相关的任务停掉就行了.
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1601 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 23:10 · PVG 07:10 · LAX 15:10 · JFK 18:10
    ♥ Do have faith in what you're doing.