We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Based on this
With new version we can pass .vue({ options }), 1 of the options of vue-loader is shadowMode, but shadowMode doesn't work without vue-style-loader.
.vue({ options })
vue-loader
shadowMode
vue-style-loader
It is possible to add option to change default style-loader to vue-style-loader, I was thinking something like this:
option
style-loader
// config.js ... shadowMode: false, ...
// components/CssWebpackConfig.js static afterLoaders({ method = 'auto' } = {}) { const loaders = []; if (Config.shadowMode) { loaders.push({ loader: 'vue-style-loader', options: { shadowMode: true } }); return loaders; } if (method === 'auto') { // TODO: Fix if (Mix.extractingStyles !== false) { method = 'extract'; } else { method = 'inline'; } } if (method === 'inline') { loaders.push({ loader: 'style-loader' }); } else if (method === 'extract') { loaders.push({ loader: MiniCssExtractPlugin.loader, options: { esModule: true } }); } else { throw new Error( `Unknown css loader method '${method}'. Expected auto, inline, or extract.` ); } return loaders; }
//mixFile mix.options({ shadowMode: true }); mix.js('src/index.js', 'dist/app.js').vue({ version: 2, options: { shadowMode: true } });
Ofcourse it will be more correct to use the .vue({ options }), but I couldn't find how I can access vue options in components/CssWebpackConfig.js
components/CssWebpackConfig.js
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Description:
Based on this
With new version we can pass
.vue({ options })
, 1 of the options ofvue-loader
isshadowMode
, but shadowMode doesn't work withoutvue-style-loader
.It is possible to add
option
to change defaultstyle-loader
tovue-style-loader
, I was thinking something like this:Ofcourse it will be more correct to use the
.vue({ options })
, but I couldn't find how I can access vue options incomponents/CssWebpackConfig.js
The text was updated successfully, but these errors were encountered: