mirror of
https://github.com/tornadocash/tornado-initiation-ui.git
synced 2024-11-22 09:36:52 +01:00
19 lines
588 B
JavaScript
19 lines
588 B
JavaScript
/* eslint-disable camelcase, no-undef */
|
|
export default (context, inject) => {
|
|
const ipfsPathRegExp = /^(\/(?:ipfs|ipns)\/[^/]+)/
|
|
const ipfsPathPrefix =
|
|
(window.location.pathname.match(ipfsPathRegExp) || [])[1] || ''
|
|
|
|
console.log('plugin __webpack_public_path__', __webpack_public_path__)
|
|
|
|
if (ipfsPathPrefix) {
|
|
__webpack_public_path__ = ipfsPathPrefix + '/_nuxt/'
|
|
|
|
if (typeof window !== 'undefined') {
|
|
context.app.router.history.base = ipfsPathPrefix || window.location.host
|
|
}
|
|
}
|
|
|
|
console.log('plugin __webpack_public_path__', __webpack_public_path__)
|
|
}
|