forked from mui/mui-x
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpackBaseConfig.js
43 lines (42 loc) · 1.26 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
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/data-grid': path.resolve(__dirname, './packages/grid/data-grid/src'),
'@material-ui/x-grid-data-generator': path.resolve(
__dirname,
'./packages/x-grid-data-generator/src',
),
'@material-ui/x-grid': path.resolve(__dirname, './packages/grid/x-grid/src'),
'@material-ui/x-license': path.resolve(__dirname, './packages/x-license/src'),
docs: path.resolve(__dirname, './docs/node_modules/@material-ui/monorepo/docs'),
docsx: 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',
},
],
},
};