-
Notifications
You must be signed in to change notification settings - Fork 14
/
webpack.config.js
33 lines (32 loc) · 940 Bytes
/
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
const { NODE_ENV = 'production' } = process.env;
module.exports = /** @type {import('webpack').Configuration} */ ({
mode: NODE_ENV,
entry: {
main: './assets/js/main.js',
contact: './assets/js/contact.js',
contact_us_form_element: './assets/js/contact_us_form_element.ts',
faqs: './assets/js/faqs.js',
partners_contact: './assets/js/partners/contact.js',
touchpoints: ['./assets/js/touchpoints_translations.js', './assets/js/touchpoints_58f51d4d.js'],
country_support: './assets/js/country_support.js',
post_office_search: './assets/js/post_office_search.tsx',
},
target: ['web'],
output: {
filename: '[name].js',
path: `${__dirname}/_site/assets/js`,
},
resolve: {
extensions: ['.js', '.ts', '.tsx'],
},
module: {
rules: [
{
test: /\.[jt]sx?$/,
exclude: /node_modules/,
use: ['babel-loader'],
},
],
},
devtool: 'source-map',
});