-3

How to create a monorepo js library that relies on a third-party tool library

import printJS from 'print-js';

export const usePrint = (id: string) => {
  printJS({
    printable: id,
    type: 'html',
    targetStyles: ['*'],
    ...options
  });
};

export * from './array';
export * from './directive';
export * from './echarts';
export * from './number';
export * from './string';
export * from './device';
export * from './color';
export * from './extra';
export * from './axios';
export * from './localstorage';
export * from './extends';
export * from './print';
export * from './datetime';

When I installed it, he told me that I must install printJS, but I do not need printJS for some projects, how can I do it on demand

laterday
  • 353
  • 1
  • 4
  • 11

0 Answers0