Added scanning barcodes with a camera

This commit is contained in:
2026-03-08 16:59:33 +00:00
parent b4f8489834
commit 5a37e5dd5f
404 changed files with 224181 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
var webpack = require('webpack'),
path = require('path');
const baseConfig = require('./webpack.config.js');
module.exports = {
...baseConfig,
externals: [
'fs',
'http',
'https',
'url',
'sharp',
'ndarray-pixels',
],
};
module.exports.target = 'node';
module.exports.resolve = {
...module.exports.resolve,
// Prefer Node builds of packages (e.g., ndarray-pixels) instead of browser entries
mainFields: ['main', 'module'],
alias: {
// Force ndarray-pixels to resolve to its Node build; webpack 4 lacks conditionNames support
'ndarray-pixels$': 'ndarray-pixels/dist/ndarray-pixels-node.cjs',
},
};
module.exports.output.libraryTarget = 'commonjs';
module.exports.output.library = undefined;
module.exports.plugins = [
new webpack.DefinePlugin({
ENV: require(path.join(__dirname, './env/', process.env.BUILD_ENV)),
}),
];
module.exports.devtool = undefined;
module.exports.output.path = __dirname + '/../lib';
module.exports.output.filename = 'quagga.js';