illidanzzz
V2EX  ›  问与答

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

  •  
  •   illidanzzz · Nov 11, 2019 · 4218 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   ·   2849 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 02:47 · PVG 10:47 · LAX 19:47 · JFK 22:47
    ♥ Do have faith in what you're doing.