leefly
V2EX  ›  Node.js

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

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