storybookjs/storybook
View on GitHub[Feature Request]: remove babel transformations in web-components-webpack preset
Open
#20,095 opened on Dec 5, 2022
help wantedmaintenanceweb-components
Description
Is your feature request related to a problem? Please describe
The web-components-webpack preset add some babel transformation by default to some specific libraries.
With storybook v7 they are not needed anymore and only increase complexity / build time:
- supports import.meta.url: webpack 5 already supports it - https://webpack.js.org/api/module-variables/#importmetaurl . Even if not supported, this is not really needed to run web components in storybook or in general
- transforms some libraries / packages (polymer, lit, vaadin): with v7 dropping support to ie does not makes sense anymore to transform such libraries. Also the selection of libraries is arbitrary / questionable: polymer is not a thing anymore. Why vaadin, a freemium product? Why not ui5, carbon, spectrum libraries - as good or better than vaadin?
Describe the solution you'd like
Remove babel transformations in web-components-webpack preset
Describe alternatives you've considered
Remove web-components-webpack preset
Are you able to assist to bring the feature to reality?
yes, I can
Additional context
Even with storybook v6 this is not needed for those that target evergreen browsers. In my projects, i manually remove babel transformation:
webpackFinal: async function (config) {
const ruleIndex = config.module.rules.findIndex(
(rule) => rule.use && rule.use.options && rule.use.options.babelrc === false
)
if (ruleIndex !== -1) {
config.module.rules.splice(ruleIndex, 1)
}
return config
},