-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
SSR document is not defined #4075
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
Comments
|
的确是使用了 |
如果禁用了 extract,那根本不会引入 mini-css-extract-plugin vue-cli/packages/@vue/cli-service/lib/config/css.js Lines 98 to 105 in 47d56e9
|
嗯,这里的逻辑是默认会把 css 抽出来的,也就是默认 但我不想把 css 从 js 中抽离出来,因为这样别人在引用的时候就得额外引入 css,这很奇怪 |
从这个讨论中看到,这是 |
请提供复现 现在的情况是,根据你的描述,你的应用应该根本没有用到 mini-css-extract-plugin,但是你认为你碰到了它的 bug? |
抱歉我还没理清楚这个问题 |
Version
3.8.2
Reproduction link
webpack-contrib/mini-css-extract-plugin#90
Environment info
Steps to reproduce
我用 vue-cli 写的组件打包之后,在 SSR 时会报错
document is not defined
,因为 css 被 inject 到 js 里了究其原因是
mini-css-extract-plugin
导致的,能否将mini-css-extract-plugin
替换成extract-css-chunks-webpack-plugin
呢?What is expected?
带 css 的组件在服务端可以正常引入
What is actually happening?
document is not defined
https://github.com/faceyspacey/extract-css-chunks-webpack-plugin
The text was updated successfully, but these errors were encountered: