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

130
Views
Is it possible to export to body of two different files from main.js?

I want to export components to multiple files from main.js, something like this:

main.js:

import Block1 from './Block1.svelte';
import Block2 from './Block2.svelte';

export const Block1  = new Block1({ target: document.body}); //to index.html 
export const Block2  = new Block2({ target: document.body}); //to index2.html 

How to compile multiple .html files to public directory in svelt js?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I found this repository:

https://github.com/Tom-Siegel/multi-page-svelte

Works well and is possible to add multiple pages as inputs

const inputs = [
  "main", //string defaults to input: src/[name].js and output: public/build/[name].js
  {
    input: "src/second.js",
    output: { file: "public/build/second.js", name: "second" },
    css: "public/build/second.css",
  }, //object for setting more specific values for input and output of roolup configuration
];
about 4 years ago · Juan Pablo Isaza Report
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!