-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
74 lines (70 loc) · 1.24 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
'use strict';
const webpack = require('webpack');
const path = require('path');
const node_modules_dir = path.resolve('node_modules');
function staticDirectory() {
return path.resolve(__dirname, 'static');
}
const filesWithoutHash = true;
module.exports = {
context: __dirname,
entry: {
index: './static/index.es6',
},
module: {
rules: [
{
test: /\.es6$/,
exclude: [node_modules_dir],
use: [
{
loader: 'babel-loader',
}
]
},
{
test: /\.tsx?$/,
exclude: [node_modules_dir],
use: [
{
loader: 'ts-loader',
options: {
configFile: 'tsconfig.without-tests.json',
silent: true,
}
}
]
},
]
},
plugins: [
new webpack.ProvidePlugin({
Backbone: 'backbone',
}),
],
output: {
path: path.join(__dirname, 'static/bundles'),
publicPath: '/static/bundles/',
filename: '[name].js',
chunkFilename: '[name].js',
pathinfo: false,
},
mode: 'development',
optimization: {
runtimeChunk: 'single',
},
devtool: false,
resolve: {
alias: {
jquery: '@tradingview/jquery/jquery-1.7.2.js',
},
extensions: ['*', '.ts', '.tsx', '.es6', '.js'],
modules: [
staticDirectory(),
'node_modules',
],
},
stats: {
children: false,
},
};