mirror of
https://gitee.com/antv/g6.git
synced 2024-12-04 04:38:55 +08:00
29 lines
728 B
JavaScript
29 lines
728 B
JavaScript
|
const path = require('path');
|
||
|
exports.onCreateWebpackConfig = ({ getConfig }) => {
|
||
|
const config = getConfig();
|
||
|
|
||
|
config.module.rules.push({
|
||
|
test: /\.glsl$/,
|
||
|
use: [
|
||
|
{
|
||
|
loader: 'raw-loader',
|
||
|
options: {
|
||
|
esModule: false,
|
||
|
},
|
||
|
},
|
||
|
],
|
||
|
});
|
||
|
|
||
|
config.module.rules.push({
|
||
|
test: /\.worker\.ts$/,
|
||
|
use: {
|
||
|
loader: 'worker-loader',
|
||
|
},
|
||
|
});
|
||
|
|
||
|
config.resolve.extensions.push('.glsl');
|
||
|
config.resolve.alias = {
|
||
|
...config.resolve.alias,
|
||
|
'https://cdn.jsdelivr.net/npm/@webgpu/glslang@0.0.15/dist/web-devel/glslang.js': path.resolve(__dirname, 'stub')
|
||
|
};
|
||
|
};
|