-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathgatsby-node.js
39 lines (35 loc) · 1.25 KB
/
gatsby-node.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
const path = require('path');
exports.onCreateWebpackConfig = ({ getConfig }) => {
const config = getConfig();
config.module.rules.push({
test: /\.glsl$/,
use: [
{
loader: 'raw-loader',
options: {},
},
],
});
config.module.rules.push({
test: /\.worker\.ts$/,
use: {
loader: 'worker-loader',
},
});
// config.module.rules.push({
// test: /\.(ts|tsx)$/,
// loader: require.resolve('awesome-typescript-loader'),
// });
config.resolve.extensions.push('.glsl');
config.resolve.alias = {
...config.resolve.alias,
'https://cdn.jsdelivr.net/npm/@webgpu/[email protected]/dist/web-devel/glslang.js': path.resolve(__dirname, 'stub'),
'@antv/g-webgpu': path.resolve(__dirname, 'packages/g-webgpu/src'),
'@antv/g-webgpu-core': path.resolve(__dirname, 'packages/core/src'),
'@antv/g-webgpu-engine': path.resolve(__dirname, 'packages/engine/src'),
'@antv/g-webgpu-compiler': path.resolve(__dirname, 'packages/compiler/src'),
'@antv/g-webgpu-interactor': path.resolve(__dirname, 'packages/interactor/src'),
'@antv/g-webgpu-unitchart': path.resolve(__dirname, 'packages/unitchart/src'),
'@antv/g-webgpu-raytracer': path.resolve(__dirname, 'packages/raytracer/src'),
};
};