2021-09-21 17:28:02 +00:00
|
|
|
import {dirname} from 'path';
|
|
|
|
|
import {fileURLToPath} from 'url';
|
|
|
|
|
import linkerPlugin from '@angular/compiler-cli/linker/babel';
|
|
|
|
|
|
|
|
|
|
export const baseDir = dirname(fileURLToPath(import.meta.url));
|
|
|
|
|
export const moduleRules = [
|
|
|
|
|
{
|
|
|
|
|
test: /\.txt$/i,
|
|
|
|
|
use: 'raw-loader',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
test: /\.m?js$/,
|
|
|
|
|
// Exclude Domino from being processed by Babel as Babel reports an error
|
|
|
|
|
// for invalid use of `with` in strict mode.
|
|
|
|
|
// https://github.com/fgnass/domino/issues/153.
|
|
|
|
|
exclude: /domino/,
|
2021-11-04 10:56:42 +00:00
|
|
|
// Workaround since Angular framework packages import from `rxjs` v6 which does
|
|
|
|
|
// have package exports yet: https://github.com/ReactiveX/rxjs/pull/6613.
|
|
|
|
|
// This is similar to what the CLI sets up internally.
|
|
|
|
|
resolve: {fullySpecified: false},
|
2021-09-21 17:28:02 +00:00
|
|
|
use: {
|
|
|
|
|
loader: 'babel-loader',
|
|
|
|
|
options: {
|
|
|
|
|
plugins: [linkerPlugin],
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
];
|