build fix

This commit is contained in:
Eugene Pankov
2021-07-24 20:18:52 +02:00
parent 01e3e91e51
commit 75a0aadce4
7 changed files with 31 additions and 84 deletions

View File

@@ -7,7 +7,7 @@ import TabbyCorePlugin, { ProfileProvider, AppService } from 'tabby-core'
import TabbyTerminalModule from 'tabby-terminal'
import { DemoTerminalTabComponent } from './components/terminalTab.component'
import { DemoProfilesService } from 'profiles'
import { DemoProfilesService } from './profiles'
/** @hidden */
@NgModule({

View File

@@ -2,7 +2,7 @@
import { Injector, NgZone } from '@angular/core'
import * as path from 'path'
import { BaseSession } from 'tabby-terminal'
import { Logger } from '../../tabby-core/typings'
import { Logger } from 'tabby-core'
const currentScript: any = document.currentScript
@@ -32,7 +32,7 @@ export class Session extends BaseSession {
Session.v86Loaded = true
}
script.src = `${this.dataPath}/v86_all.js`
document.querySelector('head').appendChild(script)
document.querySelector('head')?.appendChild(script)
})
}
@@ -94,7 +94,7 @@ export class Session extends BaseSession {
return false
}
getWorkingDirectory (): Promise<string | null> {
async getWorkingDirectory (): Promise<string | null> {
return null
}
}

View File

@@ -1,25 +1,7 @@
{
"extends": "../tsconfig.json",
"exclude": ["node_modules", "dist", "typings"],
"compilerOptions": {
"baseUrl": "src",
"module": "commonjs",
"target": "es2016",
"esModuleInterop": true,
"noImplicitAny": false,
"removeComments": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
"declaration": true,
"declarationDir": "dist",
"lib": [
"dom",
"es2015",
"es7"
]
},
"exclude": ["node_modules", "dist"]
"baseUrl": "src"
}
}

View File

@@ -1,42 +1,5 @@
const path = require('path')
module.exports = {
target: 'node',
entry: 'src/index.ts',
devtool: 'source-map',
context: __dirname,
mode: 'development',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'index.js',
pathinfo: true,
libraryTarget: 'umd',
devtoolModuleFilenameTemplate: 'webpack-tabby-demo:///[resource-path]',
},
resolve: {
modules: ['.', 'src', 'node_modules'].map(x => path.join(__dirname, x)),
extensions: ['.ts', '.js'],
},
module: {
rules: [
{
test: /\.ts$/,
loader: 'ts-loader',
options: {
configFile: path.resolve(__dirname, 'tsconfig.json'),
},
},
{ test: /\.pug$/, use: ['apply-loader', 'pug-loader'] },
{ test: /\.svg/, use: ['svg-inline-loader'] },
],
},
externals: [
'fs',
'ngx-toastr',
'path',
/^rxjs/,
/^@angular/,
/^@ng-bootstrap/,
/^tabby-/,
],
}
const config = require('../webpack.plugin.config')
module.exports = config({
name: 'web-demo',
dirname: __dirname,
})