This repository has been archived by the owner on Nov 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
/
webpack.common.js
70 lines (65 loc) · 2.59 KB
/
webpack.common.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
'use strict';
const path = require('path');
const webpack = require('webpack');
module.exports = {
entry: {
'chromium/js/babel_polyfill.js': 'babel-polyfill',
'chromium/js/popup.js': ['babel-polyfill', './src/popup.ts'],
'chromium/js/inject_webauthn.js': './src/inject_webauthn_chromium.ts',
'chromium/js/content_script.js': './src/content_script_chromium.ts',
'chromium/js/background.js': './src/background.ts',
'edge/KryptonAuthenticator/edgeextension/manifest/Extension/js/babel_polyfill.js': 'babel-polyfill',
'edge/KryptonAuthenticator/edgeextension/manifest/Extension/js/popup.js': ['babel-polyfill', './src/popup.ts'],
'edge/KryptonAuthenticator/edgeextension/manifest/Extension/js/inject.js': ['babel-polyfill', './src/inject_edge.ts'],
'edge/KryptonAuthenticator/edgeextension/manifest/Extension/js/content_script.js': ['babel-polyfill', './src/content_script_edge.ts'],
'edge/KryptonAuthenticator/edgeextension/manifest/Extension/js/background.js': ['reflect-metadata', './src/background.ts'],
'firefox/js/babel_polyfill.js': 'babel-polyfill',
'firefox/js/popup.js': ['babel-polyfill', './src/popup.ts'],
'firefox/js/content_script.js': './src/content_script_firefox.ts',
'firefox/js/background.js': './src/background.ts',
'KryptonAuthenticator.safariextension/js/babel_polyfill.js': 'babel-polyfill',
'KryptonAuthenticator.safariextension/js/popup.js': ['babel-polyfill', './src/popup_safari.ts'],
'KryptonAuthenticator.safariextension/js/content_script.js': './src/content_script_safari.ts',
'KryptonAuthenticator.safariextension/js/background.js': './src/background.ts',
'KryptonAuthenticator.safariextension/js/inject.js': './src/inject_safari.ts',
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name]',
// chunkFilename: 'js/[name].[chunkhash:8].chunk.js',
publicPath: './'
},
resolve: {
extensions: ['.ts', 'tsx', '.js'],
},
module: {
strictExportPresence: true,
rules: [{
enforce: 'pre',
test: /\.(ts|tsx)$/,
include: path.resolve(__dirname, 'src'),
loader: 'tslint-loader',
}, {
test: /\.(js|jsx|mjs)$/,
include: path.resolve(__dirname, 'src'),
loader: 'babel-loader',
options: {
compact: true,
},
}, {
test: /\.(ts|tsx)$/,
include: path.resolve(__dirname, 'src'),
loader: 'ts-loader',
}, {
test: /\.js$/,
include: /node_modules/,
loader: 'strip-sourcemap-loader',
}],
},
plugins: [
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery"
}),
],
}