__webpack_public_path__ поправлен
This commit is contained in:
16
src/main.ts
16
src/main.ts
@@ -81,24 +81,24 @@ const defaultNavigations = {
|
||||
}
|
||||
|
||||
const defaultApps = {
|
||||
login: { version: '1.0.0' },
|
||||
login: { version: '1.0.0', name: 'login' },
|
||||
main: { version: '1.0.1', name: 'main' },
|
||||
news: { version: '1.0.0' },
|
||||
org: { version: '1.0.0' },
|
||||
sections: { version: '1.0.0' }
|
||||
news: { version: '1.0.0', name: 'news' },
|
||||
org: { version: '1.0.0', name: 'org' },
|
||||
sections: { version: '1.0.0', name: 'sections' }
|
||||
}
|
||||
|
||||
export default async ({ rawapps, navigations, config }) => {
|
||||
const apps = new Apps(rawapps)
|
||||
export default async ({ apps: rowApps, navigations, config }) => {
|
||||
const apps = new Apps(rowApps)
|
||||
const history = createBrowserHistory()
|
||||
|
||||
let prevPathname = window.location.pathname
|
||||
|
||||
const app = apps.findApp(history.location.pathname)
|
||||
|
||||
const publicPath = `./${app.name}/${app.version}`
|
||||
const publicPath = `/${app.name}/${app.version}`
|
||||
|
||||
__webpack_public_path__ = `${publicPath}${__webpack_public_path__}`
|
||||
__webpack_public_path__ = `${config.baseUrl}${publicPath}${__webpack_public_path__}`
|
||||
|
||||
const appPath = `${config.baseUrl}${publicPath}/index.js`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user