Skip to content

Commit

Permalink
Merge branch 'master' into jiden/tabs-delete-index-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmaeder authored May 8, 2023
2 parents 2a39366 + 9dd0921 commit ce564f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,14 @@ import { existsSync, readFileSync } from 'fs';

export class FrontendGenerator extends AbstractGenerator {

async generate(options: GeneratorOptions = {}): Promise<void> {
const frontendModules = this.pck.targetFrontendModules;
await this.write(this.pck.frontend('index.html'), this.compileIndexHtml(frontendModules));
await this.write(this.pck.frontend('index.js'), this.compileIndexJs(frontendModules));
await this.write(this.pck.frontend('preload.js'), this.compilePreloadJs());
async generate(options?: GeneratorOptions): Promise<void> {
await this.write(this.pck.frontend('index.html'), this.compileIndexHtml(this.pck.targetFrontendModules));
await this.write(this.pck.frontend('index.js'), this.compileIndexJs(this.pck.targetFrontendModules));
await this.write(this.pck.frontend('secondary-window.html'), this.compileSecondaryWindowHtml());
await this.write(this.pck.frontend('secondary-index.js'), this.compileSecondaryIndexJs(this.pck.secondaryWindowModules));
if (this.pck.isElectron()) {
const electronMainModules = this.pck.targetElectronMainModules;
await this.write(this.pck.frontend('electron-main.js'), this.compileElectronMain(electronMainModules));
await this.write(this.pck.frontend('electron-main.js'), this.compileElectronMain(this.pck.targetElectronMainModules));
await this.write(this.pck.frontend('preload.js'), this.compilePreloadJs());
}
}

Expand Down Expand Up @@ -90,8 +88,7 @@ self.MonacoEnvironment = {
getWorkerUrl: function (moduleId, label) {
return './editor.worker.js';
}
}
`)}
}`)}
const preloader = require('@theia/core/lib/browser/preloader');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ module.exports = [{
warnings: true,
children: true
}
}, {
}${this.ifElectron(`, {
mode,
devtool: 'source-map',
entry: {
Expand All @@ -296,7 +296,7 @@ module.exports = [{
warnings: true,
children: true
}
}];`;
}`)}];`;
}

protected compileUserWebpackConfig(): string {
Expand Down

0 comments on commit ce564f0

Please sign in to comment.