-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
52 lines (45 loc) · 1.36 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
// eslint-disable-next-line @typescript-eslint/no-var-requires
const HtmlWebPackPlugin = require('html-webpack-plugin');
// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require('path');
module.exports = {
name: 'Input elements sample',
entry: './src/__samples__/index.tsx',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js',
// Specifies the base path for all the assets.
publicPath: '/'
},
// Enable sourcemaps for debugging webpack's output.
devtool: 'source-map',
devServer: {
port: 5000,
static: './src/__samples__',
hot: true
},
resolve: {
// Add '.ts' and '.tsx' as resolvable extensions.
extensions: ['.ts', '.tsx', '.js', '.json', '.less']
},
module: {
rules: [
{ test: /\.tsx?$/, loader: 'ts-loader' },
{
test: /\.css?$/,
use: ['style-loader', 'css-loader']
},
{
test: /\.less$/,
use: ['style-loader', 'css-loader', 'less-loader']
}
]
},
plugins: [
new HtmlWebPackPlugin({
template: './src/__samples__/index.html',
favicon: './src/__samples__/favicon.ico'
})
],
ignoreWarnings: [{ module: /@fluentui\/react/ }]
};