init
This commit is contained in:
commit
44f31f8b9f
402 changed files with 47865 additions and 0 deletions
17
plugins/ipfs.js
Normal file
17
plugins/ipfs.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
/* 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__)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue