The problem of webpack Packaging path

  1. assetsPublicPath distinguishes between .net or .cn. Under .cn, the path resource is https://xxx/gitrepo/biomart_a.. Under .net, the path resource is https://xxx/gitrepo/biomart_a._develop/dist/;. How should I write an extra _ develop,?
  2. cannot use location.href.indexOf ("cn") >-1, an error will be reported
build: {
    // Template for index.html
    index: path.resolve(__dirname, "../dist/index.html"),

    // Paths
    assetsRoot: path.resolve(__dirname, "../dist"),
    assetsSubDirectory: "static",
    assetsPublicPath: "https://xxx/gitrepo/biomart_admin/dist/"
 }
Aug.27,2021

find out the principle of webpack packaging. If you specify assetsPublicPath, then the prefix of the resource link in the code is this, for example, in a html file:

<head>
    <script src="https://xxx/gitrepo/biomart_admin/dist/**/xxx.js"></script>
</head>
<body>
    <img src="https://img.codeshelper.com/upload/img/2021/08/27/fda0cisp2qm31.png"></img>
</body>

the resource path is a dead
problem. I suggest starting with the server. Each of the two paths should be packaged and deployed to the website of the corresponding URL

.

https://codeshelper.com/q/10. can take a look at

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3c493-e84f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3c493-e84f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?