__webpack_public_path__ поправлен

This commit is contained in:
2020-03-28 18:17:05 +03:00
parent 485fcad15c
commit a907153d8b
2 changed files with 9 additions and 9 deletions

View File

@@ -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`