You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
quaggaJS/webpack.node.js

38 lines
782 B
JavaScript

const config = require('./webpack.config.js');
config.externals = [
'get-pixels',
'ndarray'
];
config.mode = 'production';
config.module = config.module || {};
config.module.rules = [{
test: /\.(js|ts)$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
envName: 'node'
}
}
}];
config.output = config.output || {};
config.output.filename = 'quagga.node.js';
config.output.libraryTarget = 'umd';
delete config.plugins;
config.resolve = config.resolve || {};
config.resolve.alias = {
'./config/config': './config/config.node',
'./input/frame-grabber': './input/frame-grabber.node',
'./input/image-stream': './input/image-stream.node'
};
config.target = 'node';
module.exports = config;