Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/excaliburjs/sample-ldtk. Sample using the excalibur ldtk plugin excaliburjs.com/sample-ldtk
Something went wrong. Try again.
sample-ldtk vite.config.js
1234567891011121314151617181920212223242526import { defineConfig } from "vite";
// if you use tiled maps// there is a collision between react w/ typescript .tsx// and tiled tileset files .tsx// this forces vite to not interpret tsx as reactconst tiledPlugin = () => { return { name: 'tiled-tileset-plugin', resolveId: { order: 'pre', handler(sourceId, importer, options) { if (!sourceId.endsWith(".tsx")) return; return { id: 'tileset:' + sourceId, external: 'relative' } } } };}
export default defineConfig({ // plugins: [tiledPlugin()], // hint vite that tiled tilesets should be treated as external build: { assetsInlineLimit: 0, // excalibur cannot handle inlined xml in prod mode sourcemap: true }});