Maybe stop distributing bundles
We ran into this issue recently (internal link) where setting VUE_VERSION=2
when running webpack
(and vite
) forced webpack to load GitLab UI from source.
This broke, as webpack was not configured to handle building GitLab UI from source:
2024-03-26_16:45:15.33333 webpack : ERROR in /Users/peijian/Gitlab/gitlab-development-kit/gitlab/node_modules/@gitlab/ui/src/utils.js 2:9
2024-03-26_16:45:15.33334 webpack : Module parse failed: Unexpected token (2:9)
2024-03-26_16:45:15.33335 webpack : File was processed with these loaders:
2024-03-26_16:45:15.33336 webpack : * ../../../node_modules/thread-loader/dist/cjs.js
2024-03-26_16:45:15.33336 webpack : * ../../../node_modules/babel-loader/lib/index.js
2024-03-26_16:45:15.33336 webpack : You may need an additional loader to handle the result of these loaders.
2024-03-26_16:45:15.33336 webpack : | export { GlBreakpointInstance, breakpoints } from './utils/breakpoints';
2024-03-26_16:45:15.33337 webpack : > export * as formValidators from './components/base/form/form_fields/validators';
2024-03-26_16:45:15.33337 webpack : | export * as formMappers from './components/base/form/form_fields/mappers';
Ultimately, it'll have to be fixed over there as well, but is there still a good reason to deliver a bundled version of gitlab UI? should the main repo always build gitlab UI from source instead?