forked from daostack/alchemy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
33 lines (31 loc) · 989 Bytes
/
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
const path = require('path');
const basePath = process.cwd();
module.exports = ({ config }) => {
config.module.rules.push({
test: /\.(ts|tsx)$/,
use: [
{
loader: require.resolve('awesome-typescript-loader'),
},
// Optional
{
loader: require.resolve('react-docgen-typescript-loader'),
},
],
});
config.resolve.extensions.push('.ts', '.tsx');
config.resolve.alias = {
arc: path.resolve(basePath, 'src/arc'),
actions: path.resolve(basePath, 'src/actions'),
components: path.resolve(basePath, 'src/components'),
constants: path.resolve(basePath, 'src/constants'),
layouts: path.resolve(basePath, 'src/layouts'),
lib: path.resolve(basePath, 'src/lib'),
reducers: path.resolve(basePath, 'src/reducers'),
selectors: path.resolve(basePath, 'src/selectors'),
src: path.resolve(basePath, 'src'),
data: path.resolve(basePath, 'data'),
'ipfs-api': 'ipfs-api/dist',
};
return config;
};