illidanzzz
V2EX  ›  问与答

有熟悉 customize-cra 的吗,通过 config-overrides.js 修改 publicPath 出现问题

  •  
  •   illidanzzz · Nov 11, 2019 · 4215 views
    This topic created in 2399 days ago, the information mentioned may be changed or developed.
    1. 修改了 setWebpackPublicPath 配置
    2. 页面请求 bundle.js 的位置增加了 hostsec,报 404
    3. 实际 bundle.js 的路径不带 hostsec
    const {
      override,
      setWebpackPublicPath
    } = require('customize-cra');
    const path = require('path');
    
    module.exports = override(
      setWebpackPublicPath('/hostsec')
    )
    

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2938 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 09:33 · PVG 17:33 · LAX 02:33 · JFK 05:33
    ♥ Do have faith in what you're doing.