forked from mui/material-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpackBaseConfig.js
42 lines (41 loc) · 1.39 KB
/
webpackBaseConfig.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
const path = require('path');
// This module isn't used to build the documentation. We use Next.js for that.
// This module is used by the visual regression tests to run the demos.
module.exports = {
context: path.resolve(__dirname),
resolve: {
modules: [__dirname, 'node_modules'],
alias: {
'@material-ui/core': path.resolve(__dirname, './packages/material-ui/src'),
'@material-ui/docs': path.resolve(__dirname, './packages/material-ui-docs/src'),
'@material-ui/icons': path.resolve(__dirname, './packages/material-ui-icons/src'),
'@material-ui/lab': path.resolve(__dirname, './packages/material-ui-lab/src'),
'@material-ui/styles': path.resolve(__dirname, './packages/material-ui-styles/src'),
'@material-ui/system': path.resolve(__dirname, './packages/material-ui-system/src'),
'@material-ui/utils': path.resolve(__dirname, './packages/material-ui-utils/src'),
docs: path.resolve(__dirname, './docs'),
},
extensions: ['.js', '.ts', '.tsx', '.d.ts'],
},
output: {
path: path.join(__dirname, 'build'),
filename: 'bundle.js',
publicPath: '/build/',
},
module: {
rules: [
{
test: /\.(js|ts|tsx)$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
cacheDirectory: true,
},
},
{
test: /\.md$/,
loader: 'raw-loader',
},
],
},
};