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
[v6.0.0-beta.14] VueJS - vue-loader shadowMode
#2643
Comments
We should add a way to pass arbitrary options to |
Heh I already did this for Mix v6. mix.vue({
options: {
shadowMode: true,
},
}) |
Hi @thecrypticace, thank you for reply. I tried Mix v6, doesn't work |
Laravel Mix Version: Mix Config const mix = require('laravel-mix');
mix.js('src/index.js', 'dist/webcomponents.js').vue({
version: 2,
options: {
shadowMode: true
}
}).setPublicPath('dist'); Same compontent as above, output: Do I miss something? |
That seems right to me. I'll take another look. |
shadowMode
shadowMode
I think is something to do with I tried to override mix config for module: {
rules: [
{
test: /\.s(c|a)ss$/,
use: [
{
loader: 'vue-style-loader',
options: {
shadowMode: true
}
},
'css-loader',
{
loader: 'sass-loader',
options: {
sassOptions: {
precision: 8,
outputStyle: 'expanded',
indentedSyntax: true
}
}
}
]
}
]
} But no success. I could see that shadow mode is enable for both Update: Tried to do it directly from |
Closing this, downgrading |
I was playing around with this a while ago myself and couldn't get shadowMode to work properly under any circumstance. Additionally we've had some problems with vue-style-loader necessitating reverting that change. |
Hi @thecrypticace I used this with Vue Webcomponents and works fine: https://github.com/vuejs/vue-web-component-wrapper |
With latest release I see you have added, option to choose between But, by default shadow mode in .vue({
version: 2,
runtimeOnly: true,
useVueStyleLoader: true,
vueStyleLoaderOptions: {
shadowMode: true
//or other vue-style-loader options
// Like manualInject or ssrId and etc
}
}) |
v6.0.0-beta.14
node -v
):12.14.1
npm -v
):6.13.4
Windows 10
Description:
Hi, I'm trying to implement webcomponents using Vue.
And using SFC, to inject CSS/SCSS into shadow DOM, Based on this comment, Enabling
shadowMode: true
invue-loader
should append the styles intothis.$root.shadowRoot
insted of<head>
.Steps To Reproduce:
My Mix config
Index.js
Test.vue
But all styles are still shown in
<head>
, tried usinglaravel-mix v6
, but still the same, any suggestion?The text was updated successfully, but these errors were encountered: