Skip to content

Commit 7cd40a7

Browse files
authored
Merge pull request #4 from NolanKingdon/MYG-10901-apiMin
MYG-10901 - Incorrect module entrypoint
2 parents b25119d + 53550c1 commit 7cd40a7

11 files changed

Lines changed: 20 additions & 17 deletions

dist/api.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

dist/api.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/api.min.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/api.min.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/api.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/*! mg-api-js - v2.0.0
2-
* Release on: 2020-02-27
1+
/*! mg-api-js - v2.0.1
2+
* Release on: 2020-04-27
33
* Copyright (c) 2020 Geotab Inc
44
* Licensed MIT */
55
// UMD Declaration
@@ -18,6 +18,10 @@
1818
root['GeotabApi'] = factory();
1919
}
2020
}(this, function () {
21+
// Sourcemap node support causes browser issues. Checks for browser global before requiring
22+
if(typeof window !== 'object'){
23+
require('source-map-support').install();
24+
}
2125
// Allowing async for ie10/11 - webpack requirement
2226
const regeneratorRuntime = require('regenerator-runtime');
2327
const GeotabApi = require('./GeotabApi.js').default;

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "mg-api-js",
3-
"version": "2.0.0",
4-
"description": "A MyGeotab API wrapper for clientside javascript",
3+
"version": "2.0.1",
4+
"description": "A MyGeotab API wrapper for clientside and serverside javascript",
55
"main": "dist/api.min.js",
66
"readmeFilename": "README.md",
77
"author": {

test/node/node-Credentials-Invalid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const assert = require('chai').assert;
2-
const GeotabApi = require('../../dist/api');
2+
const GeotabApi = require('../../dist/api.min.js');
33
const mocks = require('../mocks/mocks');
44
const login = mocks.login;
55
require('./nocks/nock');

test/node/node-Credentials.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const assert = require('chai').assert;
2-
const GeotabApi = require('../../dist/api');
2+
const GeotabApi = require('../../dist/api.min.js');
33
const mocks = require('../mocks/mocks');
44
const LocalStorageCredentialStore = require('../../lib/LocalStorageCredentialStore').default;
55
require('./nocks/nock');

test/web/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<meta http-equiv="X-UA-Compatible" content="ie=edge">
77
<title>Document</title>
8-
<script src="../../dist/api.js"></script>
8+
<script src="../../dist/api.min.js"></script>
99
</head>
1010
<body>
1111
<h1>Test Page</h1>

webpack.common.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ const path = require('path');
22

33
module.exports = {
44
entry: './lib/api.js',
5+
devtool: 'source-map',
56
output: {
67
path: path.resolve(__dirname, 'dist'),
7-
filename: 'api.js',
8+
filename: 'api.min.js',
89
library: 'GeotabApi',
910
libraryTarget: 'umd',
1011
globalObject: 'typeof self !== "undefined" ? self : this'

0 commit comments

Comments
 (0)