Fix paths to input files

This commit is contained in:
Ian VanSchooten 2022-09-01 21:52:51 -04:00
parent b70251e25a
commit 9a5adca82e

View File

@ -21,7 +21,7 @@ import {
} from '../virtual-file-names';
export function codeGeneratorPlugin(options: ExtendedOptions): Plugin {
const iframePath = path.resolve(__dirname, '../..', 'input', 'iframe.html');
const iframePath = path.resolve(__dirname, '../../..', 'input', 'iframe.html');
let iframeId: string;
// noinspection JSUnusedGlobalSymbols
@ -76,7 +76,7 @@ export function codeGeneratorPlugin(options: ExtendedOptions): Plugin {
alias: {
'react-dom/client': path.resolve(
__dirname,
'../..',
'../../..',
'input',
'react-dom-client-placeholder.js'
),
@ -131,7 +131,10 @@ export function codeGeneratorPlugin(options: ExtendedOptions): Plugin {
}
if (id === iframeId) {
return fs.readFileSync(path.resolve(__dirname, '../..', 'input', 'iframe.html'), 'utf-8');
return fs.readFileSync(
path.resolve(__dirname, '../../..', 'input', 'iframe.html'),
'utf-8'
);
}
return undefined;