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

203
Views
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
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!