Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12231

Do Vite Build with Playcanvas embed work?

$
0
0

I am kind of new to Vite Configurations and Playcanvas Optimization, I have been working on a project that requires Vanilla Javascript + Vite + Playcanvas Embed.

Overall everything is working fine in my project except when I built it the Files of the Playcanvas embed do not get built at all they kind of like treated as Assets files for the Vite Build.

Here is the Folder Structure of my vite Project

| css-| component.css-| main.css-| responsive.css| node_modules| public-| fonts-| images-| playcanvas--| files--| __game-scripts.js--| __loading__.js--| __modules__.js--| __settings__.js--| __start__.js--| 2008159.json--| config.json--| index.html--| logo.png--| manifest.json--| playcanvas-stable.min.js--| styles.css-| products| .gitignore| index.html| main.js| package-lock.json| package.json| style.css

After building it, The Embed of the playcanvas does not get minified maybe because it is in the public folder, or maybe I have to set configurations for it?

Result of the Build

| assets| fonts| images| playcanvas-| files-| __game-scripts.js-| __loading__.js-| __modules__.js-| __settings__.js-| __start__.js-| 2008159.json-| config.json-| index.html-| logo.png-| manifest.json-| playcanvas-stable.min.js-| styles.css| products| index.html

Everything in the Playcanavs Folder is the same as in the Dev version, I thought it will get minified and optimized like vite do with its CSS and Js

I actually trying to bundle the playcanvas embed files because they're taking around 13MB not good for loading time, I am referencing the index.html in the playcanvas directory to my main.js file as an iframe source. That is showing me the content of the playcanvas.


Viewing all articles
Browse latest Browse all 12231

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>