mirror of
https://gitee.com/antv/g6.git
synced 2024-12-02 11:48:29 +08:00
26 lines
539 B
JavaScript
26 lines
539 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');
|
|
}; |