You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Package format in Umbraco 14 is different to that of previous versions. The current setup is that the umbraco-package.json files (which defines the package) sits within samples\Umbraco14.Website\App_Plugins\Example.UI\umbraco-package.json - this should be within the actual package project and copy across during build.
The text was updated successfully, but these errors were encountered:
You can still razor class library the package (and the json files) .
As long as the result of your build end up in a wwwroot folder, you can then use the StaticWebAssetBasePath value to point to the app_plugins folder.
when this is installed on an umbraco site the folder is seen
e.g
i have:
myPackage
wwwroot
my-package
public
umbraco-package.json
src
[the typescript for the package is here]
package.json
vite.config.js
etc
then in vite.config.ts
import{defineConfig}from"vite";exportdefaultdefineConfig({build: {lib: {entry: "src/my-element.ts",// your web component source fileformats: ["es"],},outDir: "../wwwroot/my-package",// your web component will be saved in this locationsourcemap: true,rollupOptions: {external: [/^@umbraco/],},},});
running npm build puts the output in wwwroot/my-package/
if this is packaged up as a nuget project, it will pack the wwwroot folder and when its installed on an Umbraco site, the /app_plugins/my-package folder will contain the umbraco-package.json and the scripts.
Package format in Umbraco 14 is different to that of previous versions. The current setup is that the
umbraco-package.json
files (which defines the package) sits withinsamples\Umbraco14.Website\App_Plugins\Example.UI\umbraco-package.json
- this should be within the actual package project and copy across during build.The text was updated successfully, but these errors were encountered: