Vue put the map resource file in the static folder, but webpack packaged and put it into js.

the project needs json map data for the whole of China. I put the json file in the map file under the static folder.
then use

mapData = require("../../../../static/map/map/"+ self.division.divisionPid +".json");

introduce the json file. As a result, I looked at the file after packing and found that all the json files were packaged into the js file. (as shown below). Excuse me, why don"t you pack the files in?
clipboard.png

Apr.18,2022

get json files through the API, not through require. Through require, webpack will definitely collect dependent files.

for example, you can

$.getJSON('/static/map/map/a.json')

then configure nginx so that the / static/map/map path (this path can be configured at will, not necessarily the same as the folder structure) requests files under the static/map/map folder.

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-1ebff67-2a9b.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-1ebff67-2a9b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?