-
Notifications
You must be signed in to change notification settings - Fork 1
Home
To setup your vue project to be working inside salesforce (as an iframe) start with plain vanila vue (or download this starter) and follow the steps below.
Download the repo and prepare the build for salesforce
Add the section below with publicPath: '/'
module.exports = {
publicPath: './'
};
npm run build
Go to salesforce, setup, type "static resources " in quick find. Create a new static resource with options as shown below and upload the contents of the archived build from the previous step. and click "save".
Copy paste the below line as shown on the picture below to specify the static resource folder that was created before ("vue") and the entry point (the "/index.html").
<lightning:container src="{!$Resource.vue + '/index.html'}"/>
Let's say we decided to put the component on the "Home" page..
Find the newly created component on the left under "Custom" and drag it onto a section of the screen
You should be able to preview the component after that as shown below
Click "Activate" to activate the changes and select the default visibility options when prompted as shown below. Then click "save"