Unable to load preview.js in salesforce lightning web component
I am developing a salesforce lightning web component to preview box files. I download these files from CDN and uploaded into salesforce static resource.
https://cdn01.boxcdn.net/polyfills/bluebird/3.5.1/bluebird.min.js
https://cdn01.boxcdn.net/platform/preview/2.80.0/en-US/preview.js
https://cdn01.boxcdn.net/platform/preview/2.80.0/en-US/preview.css
When I try to load these files I get the error undefined.
This is my js code
Promise.all([
loadScript(this, boxPreviewResource + '/js/bluebird.min.js'),
loadScript(this, boxPreviewResource + '/js/preview.js'),
loadStyle(this, boxPreviewResource + '/css/preview.css')
])
.then(() => {
console.log('EVI_Box_Preview_2_80_0 load success: ');
})
.catch(error => {
console.log('EVI_Box_Preview_2_80_0 load error: ', error);
});
This is the error I am getting
EVI_Box_Preview_2_80_0 load error: undefined
Please let me know if there is any resolution for this error.
サインインしてコメントを残してください。
コメント
0件のコメント