Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

249
Views
JS: install external package through webpack?

I am working on a fully JS app and trying to use an external library ( https://github.com/soldair/node-qrcode ) . My current webpack.config.js is the following:

const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const inheritedConfig = require('@main/build-configs/src/webpack')


const isProd = process.env.NODE_ENV === 'production';
const currentRoot = path.join(process.cwd());

module.exports = {
    ...inheritedConfig,
    entry: { 'entry': './src/index' },
    plugins: [
        ...inheritedConfig.plugins,
        new HtmlWebpackPlugin({
            title: 'QR Code Generator',
            template: path.join(currentRoot, '../../packages/shared/html-templates/index.html')
        }),
        !isProd && new webpack.HotModuleReplacementPlugin()
    ].filter(Boolean)
};

Is there a way to add the package through my webpack config?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!