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();
|
2019-12-02 11:12:30 +08:00
|
|
|
config.module.rules.push({
|
|
|
|
test: /\.glsl$/,
|
|
|
|
use: {
|
|
|
|
loader: 'glsl-shaders-loader'
|
|
|
|
}
|
|
|
|
});
|
2019-11-14 18:15:58 +08:00
|
|
|
config.resolve.extensions.push('.glsl');
|
2019-11-14 22:24:31 +08:00
|
|
|
config.resolve.alias = {
|
|
|
|
...config.resolve.alias,
|
2019-11-25 15:27:56 +08:00
|
|
|
'@antv/l7': path.resolve(__dirname, 'packages/l7/src'),
|
2021-11-01 21:13:19 +08:00
|
|
|
'@antv/l7-mini': path.resolve(__dirname, 'packages/mini/src'),
|
2021-11-08 19:49:43 +08:00
|
|
|
'@antv/l7-maps/lib/map': path.resolve(__dirname, 'packages/maps/src/map'),
|
2019-12-02 17:55:16 +08:00
|
|
|
'@antv/l7-core': path.resolve(__dirname, 'packages/core/src'),
|
|
|
|
'@antv/l7-component': path.resolve(__dirname, 'packages/component/src'),
|
|
|
|
'@antv/l7-layers': path.resolve(__dirname, 'packages/layers/src'),
|
2020-10-26 17:44:58 +08:00
|
|
|
'@antv/l7-map': path.resolve(__dirname, 'packages/map/src'),
|
2019-12-02 17:55:16 +08:00
|
|
|
'@antv/l7-maps': path.resolve(__dirname, 'packages/maps/src'),
|
|
|
|
'@antv/l7-renderer': path.resolve(__dirname, 'packages/renderer/src'),
|
|
|
|
'@antv/l7-scene': path.resolve(__dirname, 'packages/scene/src'),
|
|
|
|
'@antv/l7-source': path.resolve(__dirname, 'packages/source/src'),
|
2021-10-13 16:51:20 +08:00
|
|
|
'@antv/l7-utils': path.resolve(__dirname, 'packages/utils/src'),
|
|
|
|
'@antv/l7-three': path.resolve(__dirname, 'packages/three/src')
|
2020-09-15 20:21:56 +08:00
|
|
|
}
|
2019-11-14 18:15:58 +08:00
|
|
|
};
|