Skip to content

Commit

Permalink
Add knex db externals to test/api package.
Browse files Browse the repository at this point in the history
Externals entries need to be added to webpack for all of the possible
database external requirements that *aren't* included in the api
package.json.

This is due to oddness in the way knex is referencing said libraries,
see commentary at : knex/knex#1128
  • Loading branch information
Jkovarik committed Dec 10, 2018
1 parent 6a25eb5 commit e811d95
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 6 deletions.
18 changes: 16 additions & 2 deletions packages/api/webpack.config.js
Expand Up @@ -5,7 +5,7 @@ let devtool = 'inline-source-map';

if(process.env.PRODUCTION) {
mode = 'production',
devtool = false
devtool = false
}

module.exports = {
Expand All @@ -19,7 +19,21 @@ module.exports = {
externals: [
'aws-sdk',
'electron',
{'formidable': 'url'}
{
'formidable': 'url',
'sqlite3': 'sqlite3',
'mariasql': 'mariasql',
'mssql': 'mssql',
'mssql/lib/base': 'mssql/lib/base',
'mssql/package.json': 'mssql/package/json',
'mysql2': 'mysql2',
'tedious': 'tedious',
'oracle': 'oracle',
'strong-oracle': 'strong-oracle',
'oracledb': 'oracledb',
'pg': 'pg',
'pg-query-stream': 'pg-query-stream'
},
],
devtool,
target: 'node'
Expand Down
16 changes: 15 additions & 1 deletion packages/integration-tests/webpack.config.js
Expand Up @@ -19,7 +19,21 @@ module.exports = {
externals: [
'aws-sdk',
'electron',
{'formidable': 'url'}
{
'formidable': 'url',
'sqlite3': 'sqlite3',
'mariasql': 'mariasql',
'mssql': 'mssql',
'mssql/lib/base': 'mssql/lib/base',
'mssql/package.json': 'mssql/package/json',
'mysql2': 'mysql2',
'tedious': 'tedious',
'oracle': 'oracle',
'strong-oracle': 'strong-oracle',
'oracledb': 'oracledb',
'pg': 'pg',
'pg-query-stream': 'pg-query-stream'
}
],
devtool,
target: 'node'
Expand Down
20 changes: 17 additions & 3 deletions tasks/test-processing/webpack.config.js
Expand Up @@ -5,7 +5,7 @@ let devtool = 'inline-source-map';

if(process.env.PRODUCTION) {
mode = 'production',
devtool = false
devtool = false
}

module.exports = {
Expand All @@ -19,8 +19,22 @@ module.exports = {
externals: [
'aws-sdk',
'electron',
{'formidable': 'url'}
{
'formidable': 'url',
'sqlite3': 'sqlite3',
'mariasql': 'mariasql',
'mssql': 'mssql',
'mssql/lib/base': 'mssql/lib/base',
'mssql/package.json': 'mssql/package/json',
'mysql2': 'mysql2',
'tedious': 'tedious',
'oracle': 'oracle',
'strong-oracle': 'strong-oracle',
'oracledb': 'oracledb',
'pg': 'pg',
'pg-query-stream': 'pg-query-stream'
}
],
devtool,
target: 'node'
};
};

0 comments on commit e811d95

Please sign in to comment.