Exclude 3rd Party libs - ghiscoding/aurelia-slickgrid GitHub Wiki
Aurelia-Slickgrid
includes a few 3rd party libraries for some Features/Services to work but in some cases you might never use certain feature(s). You could technically exclude these libraries if you never use them.
3rd party libraries
Here's a quick list (might not be up to date) of what libraries could be excluded if you are not using the associated Features/Services
Flatpickr
- used by the Inline Editor
editor: date
- used by the Inline Editor
Multiple-Select
- used by these Filters:
filter: { type: FilterType.multipleSelect }
orFilterType.singleSelect
- used by these Filters:
How to exclude
CLI
For CLI, it should be fairly easy, just don't include the libraries that you don't want from the HOWTO Wiki - Aurelia-CLI from your aurelia.json
file.
WebPack
Use the entry: { vendor [] }
to include/exclude the libraries you care about. For example
const path = require('path');
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const extractCSS = new ExtractTextPlugin('vendor.css');
const { AureliaPlugin } = require('aurelia-webpack-plugin');
module.exports = ({ prod } = {}) => {
const isDevBuild = !prod;
return [{
stats: {
modules: false
},
resolve: {
extensions: ['.js']
},
// needed for jquery plugins
externals: {
jquery: 'jQuery'
},
module: {
rules: [
// all rules here...
]
},
entry: {
vendor: [
'aurelia-dialog',
'aurelia-fetch-client',
'aurelia-logging-console',
'aurelia-router',
'aurelia-value-converters',
'aurelia-history-browser',
'aurelia-pal-browser',
'aurelia-polyfills',
'aurelia-event-aggregator',
// uncomment these if using OR
// include a variable with a flag that is set at build time
//'aurelia-slickgrid/aurelia-slickgrid/assets/lib/multiple-select/multiple-select.js',
// 'aurelia-slickgrid/aurelia-slickgrid/assets/lib/multiple-select/multiple-select.css',
'aurelia-slickgrid',
'bluebird',
'bootstrap',
'bootstrap/dist/css/bootstrap.css',
'font-awesome/css/font-awesome.css',
'jquery',
'moment',
'slickgrid'
]
},
output: {
path: path.join(__dirname, 'wwwroot', 'dist'),
publicPath: '',
filename: '[name].js',
library: '[name]_[hash]'
};
};