Skip to content
This repository has been archived by the owner on Jul 15, 2020. It is now read-only.

Commit

Permalink
Fix issue with undefined 'salesforce' variable.
Browse files Browse the repository at this point in the history
An undefined Salesforce variable was causing an issue for developers who were choosing the local development option instead of the SF development option. This change resolves the problem.
  • Loading branch information
coveoben committed Feb 6, 2018
1 parent 19f8093 commit d691d6d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions generators/typescript/templates/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const plugins = [];
if (minimize) {
plugins.push(new webpack.optimize.UglifyJsPlugin());
}
<% if(salesforce) { %>
<% if (!(typeof salesforce === 'undefined' || salesforce === null)) { %>
const coveoComponentMock = `
<script src="../vendor/coveo/js/CoveoJsSearch.Lazy.js"></script>
<script src="../vendor/coveo/js/templates/templates.js"></script>
Expand All @@ -23,7 +23,7 @@ if (minimize) {

if (!production) {
plugins.push(new webpack.HotModuleReplacementPlugin());
<% if(salesforce) { %>
<% if (!(typeof salesforce === 'undefined' || salesforce === null)) { %>
plugins.push(new VisualforceHtmlPlugin({
SalesforceContext: {
CustomModifiers: {
Expand Down Expand Up @@ -62,4 +62,4 @@ module.exports = {
},
plugins: plugins,
bail: true
};
};

0 comments on commit d691d6d

Please sign in to comment.