Commit 01e5773b authored by rocosen's avatar rocosen

Update util.ts

parent 53ea520c
/* eslint import/prefer-default-export: off */
import { URL } from 'url';
import path from 'path';
const { resolve } = require('path');
export function resolveHtmlPath(htmlFileName: string) {
if (process.env.NODE_ENV === 'development') {
......@@ -13,7 +14,7 @@ export function resolveHtmlPath(htmlFileName: string) {
let opts = require('url').format({
protocol: 'file:',
slashes: true,
pathname: path.resolve(__dirname, '../renderer/'),
pathname: resolve(__dirname, '../renderer/'),
hash:htmlFileName
})
// return `file://${path.resolve(__dirname, '../renderer/', htmlFileName)}`;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment