@mediatool/frontend-tools 1.3.4 → 1.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,20 +1,28 @@
1
1
  require('global-jsdom/register')
2
2
 
3
- if (typeof window !== 'undefined' && !window.matchMedia) {
4
- window.matchMedia = function (query) {
5
- return {
6
- matches: false,
7
- media: query,
8
- onchange: null,
9
- addListener: function () {},
10
- removeListener: function() {},
11
- addEventListener: function() {},
12
- removeEventListener: function() {},
13
- dispatchEvent: function() { return true },
3
+ if (typeof window !== 'undefined') {
4
+ if (!window.matchMedia) {
5
+ window.matchMedia = function (query) {
6
+ return {
7
+ matches: false,
8
+ media: query,
9
+ onchange: null,
10
+ addListener: function () {},
11
+ removeListener: function() {},
12
+ addEventListener: function() {},
13
+ removeEventListener: function() {},
14
+ dispatchEvent: function() { return true },
15
+ }
14
16
  }
15
17
  }
18
+
19
+ global.CustomEvent = window.CustomEvent
16
20
  }
17
21
 
18
22
  require.extensions['.css'] = function () {
19
23
  return undefined
20
- }
24
+ }
25
+
26
+ require.extensions['.less'] = function () {
27
+ return undefined
28
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediatool/frontend-tools",
3
- "version": "1.3.4",
3
+ "version": "1.3.6",
4
4
  "description": "Common configs and tooling for bundling, testing, linting frontend modules",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -17,7 +17,7 @@
17
17
  "prepublishOnly": "yarn build"
18
18
  },
19
19
  "bin": {
20
- "mtft": "./dist/mtft.cjs"
20
+ "mtft": "dist/mtft.cjs"
21
21
  },
22
22
  "dependencies": {
23
23
  "@babel/preset-react": "^7.18.6",