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

202
Vistas
esbuild outputting .css files to .js?

I setup esbuild with a sinatra app and I'm trying to bundle my CSS using the esbuild.config.js below. The problem is the css file is being output as .js. What am I doing wrong here?

import * as esbuild from 'esbuild';
import {sassPlugin} from 'esbuild-sass-plugin';
import * as path from 'path';

await esbuild.build({
  entryPoints: ["./assets/javascripts/application.js", 
                "./assets/stylesheets/application.css"],
  bundle: true,
  outdir: "./public",
  absWorkingDir: path.join(process.cwd()),
  watch: true,
  // custom plugins will be inserted is this array
  plugins: [sassPlugin({
    type: 'stylesheet'
  })],
}).catch(() => process.exit(1));

Here is the output:

public/stylesheets/application.js

(() => {
  // assets/stylesheets/application.css
  var application_default = `
p {
  color: red;
  text-align: center;
  font-size: 24px;
}`;
})();
about 4 years ago · Santiago Trujillo
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