-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwebpack.config.js
83 lines (82 loc) · 3.4 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
75
76
77
78
79
80
81
82
83
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
output: {
filename: 'main.bundle.js',
path: path.resolve(__dirname, 'dist-pages'),
},
resolve: {
alias: {
'@uprtcl/graphql': path.resolve('./node_modules/@uprtcl/graphql'),
'graphql-tag': path.resolve('./node_modules/graphql-tag'),
'lit-element': path.resolve('./node_modules/lit-element'),
'lit-html': path.resolve('./node_modules/lit-html'),
'wicg-inert': path.resolve('./node_modules/wicg-inert/dist/inert'),
'@authentic/mwc-circular-progress': path.resolve('./node_modules/@authentic/mwc-circular-progress'),
'@authentic/mwc-notched-outline': path.resolve('./node_modules/@authentic/mwc-notched-outline'),
'@material/mwc-list': path.resolve('./node_modules/@material/mwc-list'),
'@material/mwc-notched-outline': path.resolve('./node_modules/@material/mwc-notched-outline'),
'@material/mwc-textfield': path.resolve('./node_modules/@material/mwc-textfield'),
'@material/mwc-button': path.resolve('./node_modules/@material/mwc-button'),
'@material/mwc-checkbox': path.resolve('./node_modules/@material/mwc-checkbox'),
'@material/mwc-dialog': path.resolve('./node_modules/@material/mwc-dialog'),
'@material/mwc-floating-label': path.resolve('./node_modules/@material/mwc-floating-label'),
'@material/mwc-formfield': path.resolve('./node_modules/@material/mwc-formfield'),
'@material/mwc-icon': path.resolve('./node_modules/@material/mwc-icon'),
'@material/mwc-icon-button': path.resolve('./node_modules/@material/mwc-icon-button'),
'@material/mwc-line-ripple': path.resolve('./node_modules/@material/mwc-line-ripple'),
'@material/mwc-linear-progress': path.resolve('./node_modules/@material/mwc-linear-progress'),
'@material/mwc-menu': path.resolve('./node_modules/@material/mwc-menu'),
'@material/mwc-radio': path.resolve('./node_modules/@material/mwc-radio'),
'@material/mwc-ripple': path.resolve('./node_modules/@material/mwc-ripple'),
'@material/mwc-select': path.resolve('./node_modules/@material/mwc-select'),
'@material/mwc-switch': path.resolve('./node_modules/@material/mwc-switch'),
'@material/mwc-tab': path.resolve('./node_modules/@material/mwc-tab'),
'@material/mwc-tab-bar': path.resolve('./node_modules/@material/mwc-tab-bar'),
'@material/mwc-textarea': path.resolve('./node_modules/@material/mwc-textarea'),
'@material/mwc-top-app-bar': path.resolve('./node_modules/@material/mwc-top-app-bar'),
'@material/mwc-top-app-bar-fixed': path.resolve('./node_modules/@material/mwc-top-app-bar-fixed'),
},
extensions: [
'.mjs',
'.ts',
'.tsx',
'.js',
'.json',
'.css',
'.scss',
'.html',
],
},
entry: ['babel-polyfill', './src/index.ts'],
devServer: {
historyApiFallback: true,
port: 8000,
},
mode: 'development',
module: {
rules: [
{
test: /\.js$/,
use: {
loader: 'babel-loader',
options: {
presets: [['@babel/preset-env', { targets: { ie: '11' } }]],
plugins: ['@babel/plugin-syntax-dynamic-import'],
},
},
},
{
test: /\.ts$/,
use: {
loader: 'ts-loader',
},
},
],
},
plugins: [
new HtmlWebpackPlugin({
template: 'index.html',
})
],
};