feat: add shared package to pdf templates to render in the server and client side

This commit is contained in:
Ahmed Bouhuolia
2024-11-03 17:31:17 +02:00
parent ba1d9b3f28
commit 6687db4085
18 changed files with 1006 additions and 821 deletions

View File

@@ -0,0 +1,36 @@
// webpack.config.js
const path = require('path');
module.exports = {
mode: 'production',
target: 'node',
entry: './src/index.ts',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'components.umd.js',
library: {
name: '@bigcapital/library-components',
type: 'umd',
},
globalObject: 'this',
clean: true,
},
resolve: {
extensions: ['.ts', '.tsx', '.js', '.jsx'],
},
module: {
rules: [
{
test: /\.(ts|tsx)$/,
use: {
loader: 'ts-loader',
},
exclude: /node_modules/,
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
],
},
};