This repository has been archived by the owner on May 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
/
webpack.config.js
53 lines (51 loc) · 1.75 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
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = (env = {}) => {
const { defaultLocale = 'en' } = env;
return {
entry: {
index: path.join(__dirname, 'index'),
},
plugins: [
new HtmlWebpackPlugin({
lang: defaultLocale,
template: path.join(__dirname, 'packages', 'terra-functional-testing', 'tests', 'fixtures', 'accessible.html'),
chunks: ['index'],
filename: 'accessible.html',
}),
new HtmlWebpackPlugin({
lang: defaultLocale,
template: path.join(__dirname, 'packages', 'terra-functional-testing', 'tests', 'fixtures', 'insufficient-color-contrast.html'),
chunks: ['index'],
filename: 'insufficient-color-contrast.html',
}),
new HtmlWebpackPlugin({
lang: defaultLocale,
template: path.join(__dirname, 'packages', 'terra-functional-testing', 'tests', 'fixtures', 'dispatch-custom-event.html'),
chunks: ['index'],
filename: 'dispatch-custom-event.html',
}),
new HtmlWebpackPlugin({
lang: defaultLocale,
template: path.join(__dirname, 'packages', 'terra-functional-testing', 'tests', 'fixtures', 'validates-element.html'),
chunks: ['index'],
filename: 'validates-element.html',
}),
new HtmlWebpackPlugin({
lang: defaultLocale,
template: path.join(__dirname, 'packages', 'terra-functional-testing', 'tests', 'fixtures', 'element-out-of-bound.html'),
chunks: ['index'],
filename: 'element-out-of-bound.html',
}),
],
output: {
path: path.join(process.cwd(), 'build'),
},
devServer: {
devMiddleware: {
publicPath: '/',
},
},
mode: 'production',
};
};