Add node-cpu build for non supported systems of libtensorflow

pull/39/head
Sebastian Felis 2021-02-21 11:07:57 +01:00
parent 823bbe443e
commit beff86e8b1
2 changed files with 24 additions and 0 deletions

View File

@ -88,6 +88,24 @@ const targets = {
external: ['@tensorflow'], external: ['@tensorflow'],
}, },
}, },
nodeCPU: {
tfjs: {
platform: 'node',
format: 'cjs',
metafile: 'dist/tfjs.esm.json',
entryPoints: ['src/tfjs/tf-node-cpu.ts'],
outfile: 'dist/tfjs.esm.js',
external: ['@tensorflow'],
},
node: {
platform: 'node',
format: 'cjs',
metafile: 'dist/face-api.node-cpu.json',
entryPoints: ['src/index.ts'],
outfile: 'dist/face-api.node-cpu.js',
external: ['@tensorflow'],
},
},
browserNoBundle: { browserNoBundle: {
tfjs: { tfjs: {
platform: 'browser', platform: 'browser',

6
src/tfjs/tf-node-cpu.ts Normal file
View File

@ -0,0 +1,6 @@
/* eslint-disable import/no-extraneous-dependencies */
/* eslint-disable node/no-unpublished-import */
export * from '@tensorflow/tfjs';