mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-22 11:28:00 +00:00
.github
.vscode
app
build
docs
extras
patches
scripts
snap
tabby-community-color-schemes
tabby-core
tabby-electron
tabby-local
tabby-plugin-manager
tabby-serial
tabby-settings
tabby-ssh
tabby-telnet
tabby-terminal
tabby-uac
tabby-web
web
patches
entry.preload.ts
entry.ts
package.json
polyfills.buffer.ts
polyfills.ts
tsconfig.json
webpack.config.js
yarn.lock
.all-contributorsrc
.eslintrc.yml
.gitignore
.mergify.yml
.pug-lintrc.js
CODE_OF_CONDUCT.md
HACKING.md
LICENSE
README.md
appveyor.yml
electron-builder.yml
package.json
tsconfig.json
typedoc.js
webpack.config.js
webpack.plugin.config.js
yarn.lock
88 lines
2.3 KiB
JavaScript
88 lines
2.3 KiB
JavaScript
const path = require('path')
|
|
|
|
const externals = {}
|
|
for (const key of [
|
|
'child_process',
|
|
'crypto',
|
|
'dns',
|
|
'fs',
|
|
'http',
|
|
'https',
|
|
'net',
|
|
'path',
|
|
'querystring',
|
|
'tls',
|
|
'tty',
|
|
'url',
|
|
'zlib',
|
|
'../build/Release/cpufeatures.node',
|
|
'./crypto/build/Release/sshcrypto.node',
|
|
]) {
|
|
externals[key] = `commonjs ${key}`
|
|
}
|
|
|
|
module.exports = {
|
|
name: 'tabby-web-entry',
|
|
target: 'web',
|
|
entry: {
|
|
preload: path.resolve(__dirname, 'entry.preload.ts'),
|
|
bundle: path.resolve(__dirname, 'entry.ts'),
|
|
},
|
|
mode: process.env.TABBY_DEV ? 'development' : 'production',
|
|
optimization:{
|
|
minimize: false,
|
|
},
|
|
context: __dirname,
|
|
devtool: 'source-map',
|
|
output: {
|
|
path: path.join(__dirname, 'dist'),
|
|
pathinfo: true,
|
|
filename: '[name].js',
|
|
publicPath: 'auto',
|
|
},
|
|
resolve: {
|
|
modules: ['../app/node_modules', 'node_modules', '../node_modules', '../app/assets/'].map(x => path.join(__dirname, x)),
|
|
extensions: ['.ts', '.js'],
|
|
fallback: {
|
|
stream: require.resolve('stream-browserify'),
|
|
assert: require.resolve('assert/'),
|
|
constants: require.resolve('constants-browserify'),
|
|
util: require.resolve('util/'),
|
|
},
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.ts$/,
|
|
use: {
|
|
loader: 'ts-loader',
|
|
options: {
|
|
configFile: path.resolve(__dirname, 'tsconfig.json'),
|
|
},
|
|
},
|
|
},
|
|
{ test: /\.scss$/, use: ['style-loader', 'css-loader', 'sass-loader'] },
|
|
{ test: /\.css$/, use: ['style-loader', 'css-loader', 'sass-loader'] },
|
|
{
|
|
test: /\.(png|svg)$/,
|
|
use: {
|
|
loader: 'url-loader',
|
|
options: {
|
|
limit: 999999,
|
|
},
|
|
},
|
|
},
|
|
{
|
|
test: /\.(ttf|eot|otf|woff|woff2)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
|
|
use: {
|
|
loader: 'file-loader',
|
|
options: {
|
|
name: 'fonts/[name].[ext]',
|
|
},
|
|
},
|
|
},
|
|
],
|
|
},
|
|
externals,
|
|
}
|