Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

250
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda