2019-11-14 22:24:31 +08:00
|
|
|
const path = require('path');
|
2019-11-20 20:44:08 +08:00
|
|
|
exports.onCreateWebpackConfig = ({ getConfig }) => {
|
2019-11-14 18:15:58 +08:00
|
|
|
const config = getConfig();
|
|
|
|
config.resolve.extensions.push('.glsl');
|
2019-11-14 22:24:31 +08:00
|
|
|
config.resolve.alias = {
|
|
|
|
...config.resolve.alias,
|
|
|
|
'@l7/core': path.resolve(__dirname, 'packages/core/src'),
|
|
|
|
'@l7/component': path.resolve(__dirname, 'packages/component/src'),
|
|
|
|
'@l7/layers': path.resolve(__dirname, 'packages/layers/src'),
|
|
|
|
'@l7/maps': path.resolve(__dirname, 'packages/maps/src'),
|
|
|
|
'@l7/renderer': path.resolve(__dirname, 'packages/renderer/src'),
|
|
|
|
'@l7/scene': path.resolve(__dirname, 'packages/scene/src'),
|
|
|
|
'@l7/source': path.resolve(__dirname, 'packages/source/src'),
|
2019-11-21 18:46:52 +08:00
|
|
|
'@l7/utils': path.resolve(__dirname, 'packages/utils/src'),
|
|
|
|
'@antv/l7': path.resolve(__dirname, 'packages/l7/src')
|
2019-11-14 22:24:31 +08:00
|
|
|
};
|
2019-11-14 18:15:58 +08:00
|
|
|
};
|