Add TypeScript config for @mailpoet/components
This handles both type checking and type declaration emitting. [MAILPOET-5015]
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import path from 'node:path';
|
||||
import { default as defaultConfig } from '@wordpress/scripts/config/webpack.config.js';
|
||||
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
|
||||
import { WebpackEmitAllPlugin } from '../../../tools/webpack/webpack-emit-all-plugin.js';
|
||||
|
||||
const dirname = new URL('.', import.meta.url).pathname;
|
||||
@ -9,6 +10,7 @@ const plugins = [
|
||||
(plugin) => plugin.constructor.name !== 'DependencyExtractionWebpackPlugin',
|
||||
),
|
||||
new WebpackEmitAllPlugin({ context: path.join(dirname, 'src') }),
|
||||
new ForkTsCheckerWebpackPlugin({ typescript: { mode: 'write-dts' } }),
|
||||
];
|
||||
|
||||
export default {
|
||||
|
Reference in New Issue
Block a user