I’m using aurelia with jspm
and aurelia-bundler
.
I am using one aurelia-plugin in my code base, the aurelia-froala-editor
, and I noticed today that even though I’ve made the config to include it in one of my bundles, it is actually loaded from the jspm folder…
After running the bundling I get a config.js where everything seems to be generated correctly;
(Made some cut outs [/…/] for brevity)
System.config({
baseURL: "/",
defaultJSExtensions: true,
transpiler: false,
paths: {
"npm:*": "jspm/npm/*",
"github:*": "jspm/github/*",
"@common/*": "app/common/*"
},
map: {
/.../
"aurelia-froala-editor": "npm:aurelia-froala-editor@2.9.1",
/.../
"npm:aurelia-froala-editor@2.9.1": {
"aurelia-binding": "npm:aurelia-binding@2.5.2",
"aurelia-dependency-injection": "npm:aurelia-dependency-injection@1.5.2",
"systemjs/plugin-css": "github:systemjs/plugin-css@0.1.37"
},
/.../
bundles: {
"dist/libs-a400f4110c.js": [
/.../
"npm:aurelia-froala-editor@2.9.1.js",
"npm:aurelia-froala-editor@2.9.1/froala-editor-config.js",
"npm:aurelia-froala-editor@2.9.1/index.js",
/.../
],
"dist/app-d3c7185b05.js": [
/.../
]
}
});
This is the relevant config for the aurelia-bundler;
var config = {
force: true,
baseURL: './wwwroot/',
configPath: './wwwroot/config.js',
injectionConfigPath: './wwwroot/dist/config.js',
bundles: {
"dist/app": {
includes: [
'[./wwwroot/app/**/*.js]',
'./wwwroot/app/**/*.html!text'
],
options: {
inject: true,
minify: true,
rev: true
}
},
"dist/libs": {
includes: [
/.../
'aurelia-froala-editor',
/.../
],
options: {
inject: true,
minify: true,
rev: true
}
}
}
};
And in my main.ts I’m doing;
export function configure(aurelia: Aurelia) {
/.../
aurelia.use.plugin('aurelia-froala-editor', config => {
config.options({ /.../ });
});
/.../
}
But when running the app with all this set up, the plugin is still loaded from the jspm-folder;
None of my other bundled packages works like this, all them are loaded via the “libs” bundle as expected.
Any help appreciated.