g6/packages/site/gatsby-node.js
2020-12-14 12:03:28 +08:00

27 lines
452 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');
};