Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style 绑定在webpack打包后会被移除 #792

Open
jingxin2015 opened this issue Dec 30, 2024 · 1 comment
Open

style 绑定在webpack打包后会被移除 #792

jingxin2015 opened this issue Dec 30, 2024 · 1 comment

Comments

@jingxin2015
Copy link

jingxin2015 commented Dec 30, 2024

`

选择颜色看看
<script lang="ts"> import san from 'san'; export default san.defineComponent({ initData() { return { color: '#000' }; }, computed: { mainStyle: function () { const style = {} as any; const color = this.data.get('color'); style.color = color; return style; } } }); </script> <style lang="less" scoped> .app { width: 100%; height: 100%; overflow: hidden; .content { width: 100%; height: 100%; overflow: hidden; } } </style>`

如上代码,开发环境没问题,但是 webpack5 打包后,div style 中的样式丢失了,@erik168 能不能帮忙看看呀?谢谢!

@jingxin2015
Copy link
Author

可以提供demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant