vuejs-templates / webpack

A full-featured Webpack + vue-loader setup with hot reload, linting, testing & css extraction.
MIT License
9.71k stars 4.4k forks source link

dynamically change public path in vue js #1487

Open mohsen158 opened 5 years ago

mohsen158 commented 5 years ago

i want put my vue js project in ipfs . and because of that i have to change my baseuri or public path to be :

/ipfs/[hash string which i get after file added to ipfs]

but i cant do that

means i want to set public path be dynamically depends on real url somethink like this :

 module.exports = {
publicPath: process.env.NODE_ENV === 'production' ?
    '/ipfs/[hash string which i get after file added to ipfs]/' : '/'
} 

whats your idea to solve this problem?