Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ global.panes.runDataBrowser = function (uri?:string|$rdf.NamedNode|null) {

// Authenticate the user
SolidLogic.authn.checkUser()
.then(() => panes.initMainPage(SolidLogic.solidLogicSingleton.store, uri))
.then(() => {
// Avoid rdflib type identity clashes when workspace packages resolve different node_modules paths.
const storeForPanes = SolidLogic.solidLogicSingleton.store as unknown as Parameters<typeof panes.initMainPage>[0]
return panes.initMainPage(storeForPanes, uri)
})
.then(() => {
// Inject render environment into pane context after outliner exists
syncEnvironmentToContext('initMainPage')
Expand Down
5 changes: 4 additions & 1 deletion webpack.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,17 @@ const packageAliases = {
}

const workspaceAliases = {
'solid-logic': path.resolve('../solid-logic/src/index.ts'),
'SolidLogic': path.resolve('../solid-logic/src/index.ts'),
'solid-panes$': path.resolve('../solid-panes/src/index.ts'),
'solid-ui$': path.resolve('../solid-ui/src/index.ts'),
'UI$': path.resolve('../solid-ui/src/index.ts'),
'solid-ui/components/header$': path.resolve('../solid-ui/src/v2/components/header/index.ts'),
}

function getResolutionMode (env = {}) {
const resolutionMode = env.resolutionMode || process.env.MASHLIB_RESOLUTION_MODE || PACKAGE_RESOLUTION_MODE
const isDevServeOrWatch = Boolean(process.env.WEBPACK_SERVE || process.argv.includes('--watch'))
const resolutionMode = env.resolutionMode || process.env.MASHLIB_RESOLUTION_MODE || (isDevServeOrWatch ? WORKSPACE_RESOLUTION_MODE : PACKAGE_RESOLUTION_MODE)
Comment on lines +34 to +35
if (resolutionMode !== PACKAGE_RESOLUTION_MODE && resolutionMode !== WORKSPACE_RESOLUTION_MODE) {
throw new Error(`Invalid mashlib webpack resolution mode: ${resolutionMode}. Use "${PACKAGE_RESOLUTION_MODE}" or "${WORKSPACE_RESOLUTION_MODE}".`)
}
Expand Down
Loading