mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix getExtensionPageUrl on Windows (#1609)
* Fix getExtensionPageUrl on Windows Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com> * Use path.posix.join() instead Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com> * Fix lint issues Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
parent
c22d569fe2
commit
57d6dfa4b0
@ -44,7 +44,7 @@ export function getExtensionPageUrl<P extends object>({ extensionId, pageId = ""
|
||||
const extensionBaseUrl = compile(`/extension/:name`)({
|
||||
name: sanitizeExtensionName(extensionId), // compile only with extension-id first and define base path
|
||||
});
|
||||
const extPageRoutePath = path.join(extensionBaseUrl, pageId); // page-id might contain route :param-s, so don't compile yet
|
||||
const extPageRoutePath = path.posix.join(extensionBaseUrl, pageId);
|
||||
|
||||
if (params) {
|
||||
return compile(extPageRoutePath)(params); // might throw error when required params not passed
|
||||
|
||||
@ -6,6 +6,7 @@ import { sassCommonVars } from "./src/common/vars";
|
||||
export default function (): webpack.Configuration {
|
||||
const entry = "./src/extensions/extension-api.ts";
|
||||
const outDir = "./src/extensions/npm/extensions/dist";
|
||||
|
||||
return {
|
||||
// Compile for Electron for renderer process
|
||||
// see <https://webpack.js.org/configuration/target/>
|
||||
|
||||
@ -8,6 +8,7 @@ import * as vars from "./src/common/vars";
|
||||
|
||||
export default function (): webpack.Configuration {
|
||||
console.info("WEBPACK:main", vars);
|
||||
|
||||
return {
|
||||
context: __dirname,
|
||||
target: "electron-main",
|
||||
|
||||
@ -17,6 +17,7 @@ export function webpackLensRenderer({ showVars = true } = {}): webpack.Configura
|
||||
if (showVars) {
|
||||
console.info("WEBPACK:renderer", vars);
|
||||
}
|
||||
|
||||
return {
|
||||
context: __dirname,
|
||||
target: "electron-renderer",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user