Giter Site home page Giter Site logo

gavinr-maps / esri-svelte-example Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 4.0 23.74 MB

An example web application that shows how to use the ArcGIS API for JavaScript with Svelte

Home Page: https://esri-svelte-example.gavinr.com

License: Apache License 2.0

HTML 11.58% JavaScript 16.63% Svelte 71.79%
arcgis-api javascript svelte sveltejs arcgis-js-api esri-svelte vite vitejs arcgis

esri-svelte-example's People

Contributors

gavinr avatar gavinr-maps avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

esri-svelte-example's Issues

Using ArcGIS API for JavaScript modules in a web worker causes "npm run build" to fail

Vite has a nice feature where you can add ?worker to an import and it will create a web worker. (see https://vitejs.dev/guide/features.html#web-workers)

When using a module from the ArcGIS API for JavaScript in the web worker, "npm run dev" works fine but "npm run build" (which, I think uses Rollup), fails with the error:

To preserve the export signature of the entry module "src\testWorker.ts", an empty facade chunk was created. This often happens when creating a bundle for a web app where chunks are placed in script tags and exports are ignored. In this case it is recommended to set "preserveEntrySignatures: false" to avoid this and reduce the number of chunks. Otherwise if this is intentional, set "preserveEntrySignatures: 'strict'" explicitly to silence this warning.
โœ“ 10 modules transformed.
[vite:worker] Invalid value "iife" for option "output.format" - UMD and IIFE output formats are not supported for code-splitting builds.
file: C:/.../svelte-vite-web-workers-issue/src/testWorker.ts?worker
error during build:
Error: Invalid value "iife" for option "output.format" - UMD and IIFE output formats are not supported for code-splitting builds.

Replication Steps:

  1. Clone this repo: https://github.com/gavinr/svelte-vite-web-workers-issue
  2. npm install
  3. npm run dev - notice it works fine
  4. npm run build - build fails, with the above error (expected: build should work)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.