1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-11-27 18:55:58 +03:00
tabby/app/webpack.config.js

71 lines
2.2 KiB
JavaScript
Raw Normal View History

2017-04-12 13:12:57 +03:00
const path = require('path')
const webpack = require('webpack')
module.exports = {
name: 'terminus',
target: 'node',
entry: {
2017-06-21 00:58:42 +03:00
'index.ignore': 'file-loader?name=index.html!val-loader!pug-html-loader!' + path.resolve(__dirname, './index.pug'),
2017-04-12 13:12:57 +03:00
'preload': path.resolve(__dirname, 'src/entry.preload.ts'),
'bundle': path.resolve(__dirname, 'src/entry.ts'),
},
context: __dirname,
devtool: 'source-map',
output: {
2017-04-24 01:34:07 +03:00
path: path.join(__dirname, 'dist'),
2017-04-12 13:12:57 +03:00
pathinfo: true,
filename: '[name].js'
},
resolve: {
modules: ['src/', 'node_modules', '../node_modules', 'assets/'].map(x => path.join(__dirname, x)),
extensions: ['.ts', '.js'],
},
module: {
loaders: [
{
test: /\.ts$/,
2017-04-15 16:20:18 +03:00
loader: 'awesome-typescript-loader',
options: {
configFileName: path.resolve(__dirname, 'tsconfig.json'),
}
2017-04-12 13:12:57 +03:00
},
2017-04-24 01:43:58 +03:00
{ test: /\.scss$/, use: ['style-loader', 'css-loader', 'sass-loader'] },
{ test: /\.css$/, use: ['style-loader', 'css-loader', 'sass-loader'] },
2017-04-12 13:12:57 +03:00
{
test: /\.(png|svg)$/,
loader: "file-loader",
options: {
2017-04-15 16:20:18 +03:00
name: 'images/[name].[ext]'
2017-04-12 13:12:57 +03:00
}
},
{
test: /\.(ttf|eot|otf|woff|woff2)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: "file-loader",
options: {
2017-04-15 16:20:18 +03:00
name: 'fonts/[name].[ext]'
2017-04-12 13:12:57 +03:00
}
}
]
},
externals: {
'@angular/core': 'commonjs @angular/core',
'@angular/compiler': 'commonjs @angular/compiler',
'@angular/platform-browser': 'commonjs @angular/platform-browser',
'@angular/platform-browser-dynamic': 'commonjs @angular/platform-browser-dynamic',
'@angular/forms': 'commonjs @angular/forms',
'@angular/common': 'commonjs @angular/common',
'@ng-bootstrap/ng-bootstrap': 'commonjs @ng-bootstrap/ng-bootstrap',
2017-07-24 15:48:16 +03:00
'child_process': 'commonjs child_process',
2017-04-30 01:25:01 +03:00
'electron': 'commonjs electron',
2017-05-01 14:35:26 +03:00
'electron-is-dev': 'commonjs electron-is-dev',
2017-04-15 16:20:18 +03:00
'module': 'commonjs module',
2017-06-28 00:35:19 +03:00
'mz': 'commonjs mz',
2017-04-15 16:20:18 +03:00
'path': 'commonjs path',
2017-04-12 13:12:57 +03:00
'rxjs': 'commonjs rxjs',
2017-07-01 01:55:21 +03:00
'zone.js': 'commonjs zone.js/dist/zone.js',
2017-06-21 00:28:58 +03:00
},
plugins: [
new webpack.optimize.ModuleConcatenationPlugin(),
],
2017-04-12 13:12:57 +03:00
}