illidanzzz
V2EX  ›  问与答

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

  •  
  •   illidanzzz · Nov 11, 2019 · 4275 views
    This topic created in 2436 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   ·   1111 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 23:25 · PVG 07:25 · LAX 16:25 · JFK 19:25
    ♥ Do have faith in what you're doing.