forked from mui/material-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpackBaseConfig.js
50 lines (49 loc) · 1.99 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
43
44
45
46
47
48
49
50
const path = require('path');
// WARNING: Use this module only as an inspiration.
// Cherry-pick the parts you need and inline them in the webpack.config you need.
// 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 and by eslint-plugin-import.
module.exports = {
context: path.resolve(__dirname),
resolve: {
modules: [__dirname, 'node_modules'],
alias: {
'@mui/material': path.resolve(__dirname, './packages/mui-material/src'),
'@mui/docs': path.resolve(__dirname, './packages/mui-docs/src'),
'@mui/icons-material': path.resolve(__dirname, './packages/mui-icons-material/lib'),
'@mui/lab': path.resolve(__dirname, './packages/mui-lab/src'),
'@mui/styled-engine': path.resolve(__dirname, './packages/mui-styled-engine/src'),
'@mui/styled-engine-sc': path.resolve(__dirname, './packages/mui-styled-engine-sc/src'),
'@mui/styles': path.resolve(__dirname, './packages/mui-styles/src'),
'@mui/system': path.resolve(__dirname, './packages/mui-system/src'),
'@mui/private-theming': path.resolve(__dirname, './packages/mui-private-theming/src'),
'@mui/core': path.resolve(__dirname, './packages/mui-core/src'),
'@mui/utils': path.resolve(__dirname, './packages/mui-utils/src'),
'@mui/material-next': path.resolve(__dirname, './packages/mui-material-next/src'),
'typescript-to-proptypes': path.resolve(__dirname, './packages/typescript-to-proptypes/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',
},
],
},
};