Skip to content

emarutian/vue-salesforce-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue-salesforce-starter

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Run your tests

npm run test

Lints and fixes files

npm run lint

Prepare the build for Salesforce Deployment

create vue.config.js file as specified -> add the section below with publicPath: '/'

module.exports = {
  publicPath: './'
};

Build the project

npm run build

go to DIST folder and create an archive (zip) file from the contents -> archive these files

Archive the contents of the dist folder

Prepare the Salesforce.

Create a new static resource

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".

New Static Resource Creation

Create a new lightning web component using SF Developer Console where the vue app will reside

Open Salesforce Developer Console and create a new Lightning component as shown on the picture

SF Developer Console - Creating Web Component

Fill out the options as shown for the new component

Fill out the options as shown

Configure the vueApp.cmp file

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'}"/>

Lightning Component Configuration

Let's use the component

Let's say we decided to put the component on the "Home" page..

Goto "Edit page" as shown on the picture below

SF Edit 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 Drag and Drop the vue component

Save the changes and exit the edit mode

Click "Activate" to activate the changes and select the default visibility options when prompted as shown below. Then click "save"

Save and Activate the changes made

Accept the default options

That's it! You should be able to see the Vue starter page inside Salesforce

Vue Starter Page inside Salesforce

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published