Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how combine esbuild-svelte and esbuild-coffeescript ? #5

Open
MatrixFr opened this issue Jul 2, 2022 · 0 comments
Open

how combine esbuild-svelte and esbuild-coffeescript ? #5

MatrixFr opened this issue Jul 2, 2022 · 0 comments

Comments

@MatrixFr
Copy link

MatrixFr commented Jul 2, 2022

I try to use coffeescript in svelte on my rails app and i don't understand how merge both :

#!/usr/bin/env node

const watch              = process.argv.includes("--watch");
const esbuild            = require('esbuild')
const coffeeScriptPlugin = require('esbuild-coffeescript');
const esbuildSvelte      = require('esbuild-svelte');
const sveltePreprocess   = require('svelte-preprocess');

esbuild
  .build({
    entryPoints: ["app/javascript/svelte_src.js"],
    bundle: true,
    outfile: "app/assets/builds/svelte.js",
    plugins: [
      esbuildSvelte({
        preprocess: sveltePreprocess(/*{coffeescript: { bare: true }}*/),
      }),
      coffeeScriptPlugin({bare: true}),
    ],
    logLevel: "debug",
    watch: watch
  })
  .catch(() => process.exit(1));

I tried add plugin at the different place, but not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant