mirror of https://github.com/msgbyte/tailchat
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
458 B
TypeScript
19 lines
458 B
TypeScript
import type { Configuration } from 'webpack';
|
|
import type { DefaultWebpackConfig } from 'webpack-test-utils';
|
|
|
|
const loaderPath = require.resolve('../src/index.ts');
|
|
|
|
export function configureLoader(config: DefaultWebpackConfig & Configuration) {
|
|
config.resolveLoader.alias = {
|
|
'source-ref-loader': loaderPath,
|
|
};
|
|
|
|
config.module.rules.push({
|
|
test: /\.tsx$/,
|
|
loader: 'source-ref-loader',
|
|
options: {
|
|
available: true,
|
|
},
|
|
});
|
|
}
|