-
Notifications
You must be signed in to change notification settings - Fork 14
/
webpack.e2e.config.js
63 lines (60 loc) · 1.5 KB
/
webpack.e2e.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
/*
This module is used by the visual regression tests to run the demos.
Type checking is disabled by default for speed, it's 5x slower!
If type checking is desired for debugging remove both cache-loader and thread-loader and set transpileOnly to false',
*/
const path = require('path');
const webpack = require('webpack');
const CopyPlugin = require('copy-webpack-plugin');
module.exports = {
entry: './e2e/index',
context: path.resolve(__dirname),
resolve: {
modules: [__dirname, 'node_modules'],
extensions: ['.ts', '.tsx', '.js'],
},
output: {
path: path.join(__dirname, 'e2e/dist'),
filename: 'index.js',
publicPath: '/dist/',
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: 'ts-loader',
options: {
configFile: 'e2e/tsconfig.json',
transpileOnly: true,
},
exclude: [
/src\/icons\/(filled|outlined)\/(material|material-outlined)\/\.*/,
],
},
{
test: /\.js$/,
enforce: 'pre',
loader: 'import-glob',
exclude: [
/src\/icons\/(filled|outlined)\/(material|material-outlined)\/\.*/,
],
},
{
test: /\.(png|jpe?g|gif|svg|mp3)$/,
loader: 'file-loader',
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
],
},
plugins: [
new CopyPlugin({
patterns: [{from: 'static', to: ''}],
}),
new webpack.ProvidePlugin({
process: 'process/browser',
}),
],
};