How do you get syncfusion to work in an aurelia electron app using webpack?
up vote
1
down vote
favorite
I have Aurelia, Electron, and Webpack working but I would like to include the CDN version of Syncfusion. In a normal web app you can just include it in the HTML file but how do you include it in an Aurelia Electron Webpack app?
In my app.html
I have the below code:
<require from="http://cdn.syncfusion.com/js/assets/external/jquery-1.10.2.min.js"></require>
<require from="http://cdn.syncfusion.com/js/assets/external/jsrender.min.js"></require>
<require from="http://cdn.syncfusion.com/16.3.0.29/js/web/ej.web.all.min.js"></require>
webpack electron aurelia syncfusion
add a comment |
up vote
1
down vote
favorite
I have Aurelia, Electron, and Webpack working but I would like to include the CDN version of Syncfusion. In a normal web app you can just include it in the HTML file but how do you include it in an Aurelia Electron Webpack app?
In my app.html
I have the below code:
<require from="http://cdn.syncfusion.com/js/assets/external/jquery-1.10.2.min.js"></require>
<require from="http://cdn.syncfusion.com/js/assets/external/jsrender.min.js"></require>
<require from="http://cdn.syncfusion.com/16.3.0.29/js/web/ej.web.all.min.js"></require>
webpack electron aurelia syncfusion
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have Aurelia, Electron, and Webpack working but I would like to include the CDN version of Syncfusion. In a normal web app you can just include it in the HTML file but how do you include it in an Aurelia Electron Webpack app?
In my app.html
I have the below code:
<require from="http://cdn.syncfusion.com/js/assets/external/jquery-1.10.2.min.js"></require>
<require from="http://cdn.syncfusion.com/js/assets/external/jsrender.min.js"></require>
<require from="http://cdn.syncfusion.com/16.3.0.29/js/web/ej.web.all.min.js"></require>
webpack electron aurelia syncfusion
I have Aurelia, Electron, and Webpack working but I would like to include the CDN version of Syncfusion. In a normal web app you can just include it in the HTML file but how do you include it in an Aurelia Electron Webpack app?
In my app.html
I have the below code:
<require from="http://cdn.syncfusion.com/js/assets/external/jquery-1.10.2.min.js"></require>
<require from="http://cdn.syncfusion.com/js/assets/external/jsrender.min.js"></require>
<require from="http://cdn.syncfusion.com/16.3.0.29/js/web/ej.web.all.min.js"></require>
webpack electron aurelia syncfusion
webpack electron aurelia syncfusion
edited Nov 21 at 7:42
Jesse de Bruijne
2,44951325
2,44951325
asked Nov 19 at 13:22
dan
1,63232442
1,63232442
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
10
down vote
accepted
For your information, Webpack application will bundle the script files in the dist
folder which is helpful to run the Electron application.
To import the Syncfusion JavaScript dependencies files, you can use either of these two ways:
- Import the script in
main.ts
file - Create a custom JavaScript file for Syncfusion Dependencies
Import the script in main.ts file
Import the script in main.ts file as like below code snippet. While importing the Syncfusion JavaScript dependencies as below, it will be bundled in the dist
folder.
...
import { PLATFORM } from 'aurelia-pal';
import * as Bluebird from 'bluebird';
import 'syncfusion-javascript/Scripts/ej/web/ej.grid.min';
// remove out if you don't want a Promise polyfill (remove also from webpack.config.js)
Bluebird.config({ warnings: { wForgottenReturn: false } });
export async function configure(aurelia: Aurelia) {
aurelia.use
.standardConfiguration()
.developmentLogging()
.plugin(PLATFORM.moduleName('aurelia-syncfusion-bridge'), (syncfusion) => syncfusion.ejGrid());
...
Create a custom JavaScript file for Syncfusion Dependencies
You have to create a custom JavaScript file for Syncfusion Dependencies (ej.web.all.min.js
) and import the created JavaScript files using require
in your app.html
file.
add a comment |
up vote
0
down vote
The require tag is not for external CDNs, but is for local custom elements/value converters/custom attributes/styles. Add the <script src="http://...">
element to your index.html or create a custom element to load the script in a specific component like this.
I can't include it in the index.html as this is an electron app. I read about the custom component but I hope there is a better way. If there are no more answers I will mark this as correct
– dan
Nov 20 at 3:57
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
10
down vote
accepted
For your information, Webpack application will bundle the script files in the dist
folder which is helpful to run the Electron application.
To import the Syncfusion JavaScript dependencies files, you can use either of these two ways:
- Import the script in
main.ts
file - Create a custom JavaScript file for Syncfusion Dependencies
Import the script in main.ts file
Import the script in main.ts file as like below code snippet. While importing the Syncfusion JavaScript dependencies as below, it will be bundled in the dist
folder.
...
import { PLATFORM } from 'aurelia-pal';
import * as Bluebird from 'bluebird';
import 'syncfusion-javascript/Scripts/ej/web/ej.grid.min';
// remove out if you don't want a Promise polyfill (remove also from webpack.config.js)
Bluebird.config({ warnings: { wForgottenReturn: false } });
export async function configure(aurelia: Aurelia) {
aurelia.use
.standardConfiguration()
.developmentLogging()
.plugin(PLATFORM.moduleName('aurelia-syncfusion-bridge'), (syncfusion) => syncfusion.ejGrid());
...
Create a custom JavaScript file for Syncfusion Dependencies
You have to create a custom JavaScript file for Syncfusion Dependencies (ej.web.all.min.js
) and import the created JavaScript files using require
in your app.html
file.
add a comment |
up vote
10
down vote
accepted
For your information, Webpack application will bundle the script files in the dist
folder which is helpful to run the Electron application.
To import the Syncfusion JavaScript dependencies files, you can use either of these two ways:
- Import the script in
main.ts
file - Create a custom JavaScript file for Syncfusion Dependencies
Import the script in main.ts file
Import the script in main.ts file as like below code snippet. While importing the Syncfusion JavaScript dependencies as below, it will be bundled in the dist
folder.
...
import { PLATFORM } from 'aurelia-pal';
import * as Bluebird from 'bluebird';
import 'syncfusion-javascript/Scripts/ej/web/ej.grid.min';
// remove out if you don't want a Promise polyfill (remove also from webpack.config.js)
Bluebird.config({ warnings: { wForgottenReturn: false } });
export async function configure(aurelia: Aurelia) {
aurelia.use
.standardConfiguration()
.developmentLogging()
.plugin(PLATFORM.moduleName('aurelia-syncfusion-bridge'), (syncfusion) => syncfusion.ejGrid());
...
Create a custom JavaScript file for Syncfusion Dependencies
You have to create a custom JavaScript file for Syncfusion Dependencies (ej.web.all.min.js
) and import the created JavaScript files using require
in your app.html
file.
add a comment |
up vote
10
down vote
accepted
up vote
10
down vote
accepted
For your information, Webpack application will bundle the script files in the dist
folder which is helpful to run the Electron application.
To import the Syncfusion JavaScript dependencies files, you can use either of these two ways:
- Import the script in
main.ts
file - Create a custom JavaScript file for Syncfusion Dependencies
Import the script in main.ts file
Import the script in main.ts file as like below code snippet. While importing the Syncfusion JavaScript dependencies as below, it will be bundled in the dist
folder.
...
import { PLATFORM } from 'aurelia-pal';
import * as Bluebird from 'bluebird';
import 'syncfusion-javascript/Scripts/ej/web/ej.grid.min';
// remove out if you don't want a Promise polyfill (remove also from webpack.config.js)
Bluebird.config({ warnings: { wForgottenReturn: false } });
export async function configure(aurelia: Aurelia) {
aurelia.use
.standardConfiguration()
.developmentLogging()
.plugin(PLATFORM.moduleName('aurelia-syncfusion-bridge'), (syncfusion) => syncfusion.ejGrid());
...
Create a custom JavaScript file for Syncfusion Dependencies
You have to create a custom JavaScript file for Syncfusion Dependencies (ej.web.all.min.js
) and import the created JavaScript files using require
in your app.html
file.
For your information, Webpack application will bundle the script files in the dist
folder which is helpful to run the Electron application.
To import the Syncfusion JavaScript dependencies files, you can use either of these two ways:
- Import the script in
main.ts
file - Create a custom JavaScript file for Syncfusion Dependencies
Import the script in main.ts file
Import the script in main.ts file as like below code snippet. While importing the Syncfusion JavaScript dependencies as below, it will be bundled in the dist
folder.
...
import { PLATFORM } from 'aurelia-pal';
import * as Bluebird from 'bluebird';
import 'syncfusion-javascript/Scripts/ej/web/ej.grid.min';
// remove out if you don't want a Promise polyfill (remove also from webpack.config.js)
Bluebird.config({ warnings: { wForgottenReturn: false } });
export async function configure(aurelia: Aurelia) {
aurelia.use
.standardConfiguration()
.developmentLogging()
.plugin(PLATFORM.moduleName('aurelia-syncfusion-bridge'), (syncfusion) => syncfusion.ejGrid());
...
Create a custom JavaScript file for Syncfusion Dependencies
You have to create a custom JavaScript file for Syncfusion Dependencies (ej.web.all.min.js
) and import the created JavaScript files using require
in your app.html
file.
edited Nov 20 at 15:18
Jesse de Bruijne
2,44951325
2,44951325
answered Nov 20 at 11:50
christo issac
1809
1809
add a comment |
add a comment |
up vote
0
down vote
The require tag is not for external CDNs, but is for local custom elements/value converters/custom attributes/styles. Add the <script src="http://...">
element to your index.html or create a custom element to load the script in a specific component like this.
I can't include it in the index.html as this is an electron app. I read about the custom component but I hope there is a better way. If there are no more answers I will mark this as correct
– dan
Nov 20 at 3:57
add a comment |
up vote
0
down vote
The require tag is not for external CDNs, but is for local custom elements/value converters/custom attributes/styles. Add the <script src="http://...">
element to your index.html or create a custom element to load the script in a specific component like this.
I can't include it in the index.html as this is an electron app. I read about the custom component but I hope there is a better way. If there are no more answers I will mark this as correct
– dan
Nov 20 at 3:57
add a comment |
up vote
0
down vote
up vote
0
down vote
The require tag is not for external CDNs, but is for local custom elements/value converters/custom attributes/styles. Add the <script src="http://...">
element to your index.html or create a custom element to load the script in a specific component like this.
The require tag is not for external CDNs, but is for local custom elements/value converters/custom attributes/styles. Add the <script src="http://...">
element to your index.html or create a custom element to load the script in a specific component like this.
answered Nov 20 at 3:21
jbockle
54329
54329
I can't include it in the index.html as this is an electron app. I read about the custom component but I hope there is a better way. If there are no more answers I will mark this as correct
– dan
Nov 20 at 3:57
add a comment |
I can't include it in the index.html as this is an electron app. I read about the custom component but I hope there is a better way. If there are no more answers I will mark this as correct
– dan
Nov 20 at 3:57
I can't include it in the index.html as this is an electron app. I read about the custom component but I hope there is a better way. If there are no more answers I will mark this as correct
– dan
Nov 20 at 3:57
I can't include it in the index.html as this is an electron app. I read about the custom component but I hope there is a better way. If there are no more answers I will mark this as correct
– dan
Nov 20 at 3:57
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53375565%2fhow-do-you-get-syncfusion-to-work-in-an-aurelia-electron-app-using-webpack%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown