diff --git a/config/webpack.config.js b/config/webpack.config.js index 39dc08d15c6099146e30fee7c4a1406219e18147..3bcdc8245f5b930407330c362ac19f580edbee3b 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -371,6 +371,11 @@ module.exports = { include: /node_modules/, loader: 'babel-loader', }, + { + test: /gridstack\/.*\.js$/, + include: /node_modules/, + loader: 'babel-loader', + }, { test: /_worker\.js$/, resourceQuery: /worker/, diff --git a/jest.config.base.js b/jest.config.base.js index 1907b084fb676edcfd52fc3aa5a432403bbc2ba5..5253286bfa92de360a826360f8630abd6109de80 100644 --- a/jest.config.base.js +++ b/jest.config.base.js @@ -203,6 +203,7 @@ module.exports = (path, options = {}) => { '@gitlab/favicon-overlay', '@gitlab/cluster-client', 'bootstrap-vue', + 'gridstack', 'three', 'monaco-editor', 'monaco-yaml', diff --git a/package.json b/package.json index ec468be2ba1442366596a2b91a0477345a4239e5..92e366217f9d6414cdac4c6d20ad9bfb49b590ea 100644 --- a/package.json +++ b/package.json @@ -145,7 +145,7 @@ "gettext-parser": "^6.0.0", "graphql": "^15.7.2", "graphql-tag": "^2.11.0", - "gridstack": "^7.3.0", + "gridstack": "^8.3.0", "highlight.js": "^11.8.0", "immer": "^9.0.15", "ipaddr.js": "^1.9.1", diff --git a/storybook/config/webpack.config.js b/storybook/config/webpack.config.js index a10ae0887ff06886cd08dbf5728feaf2480b4a07..d447211cbd844d6e645b95b77a82271c4d5db319 100644 --- a/storybook/config/webpack.config.js +++ b/storybook/config/webpack.config.js @@ -117,6 +117,10 @@ module.exports = function storybookWebpackConfig({ config }) { config.resolve.extensions = Array.from( new Set([...config.resolve.extensions, ...gitlabWebpackConfig.resolve.extensions]), ); + config.resolve.alias = { + ...config.resolve.alias, + gridstack: require.resolve('gridstack/dist/es5/gridstack.js'), + }; // Replace any Storybook-defined CSS loaders with our custom one. config.module.rules = [ diff --git a/yarn.lock b/yarn.lock index 713d8455812c492cec4bff03722d738a4240a535..b423b70ed2ce81bfa7a4c18313f6896ffc597966 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6746,10 +6746,10 @@ graphql@^15.7.2: resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.7.2.tgz#85ab0eeb83722977151b3feb4d631b5f2ab287ef" integrity sha512-AnnKk7hFQFmU/2I9YSQf3xw44ctnSFCfp3zE0N6W174gqe9fWG/2rKaKxROK7CcI3XtERpjEKFqts8o319Kf7A== -gridstack@^7.3.0: - version "7.3.0" - resolved "https://registry.yarnpkg.com/gridstack/-/gridstack-7.3.0.tgz#7b32395edcd885bc39b84068ac86f2831f7a2451" - integrity sha512-JKZgsHzm1ljkn1NnBZpf8j4NDOBCXTuw0m1ZC0sr6NKUh0BFWzXAONIxtX1hWGUVeKLj5l1VcmnTwCXw5ypDNw== +gridstack@^8.3.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/gridstack/-/gridstack-8.3.0.tgz#4c79f8b8c4cffeb3664266108e38ed91b3d0f7b4" + integrity sha512-RcL2xskAYKOpakvpSwHdKheG7C7YgNY7777C5m+T1JMjSgcmEc3qPBM573l0NuyjMz4Errx1/3p+rMgUfF4+mw== gzip-size@^6.0.0: version "6.0.0"