-
Notifications
You must be signed in to change notification settings - Fork 916
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
Can't use Webpack's layers when VueLoader is used #1849
Comments
This patch does it for me: patches/vue-loader+15.9.6.patch diff --git a/node_modules/vue-loader/lib/plugin-webpack5.js b/node_modules/vue-loader/lib/plugin-webpack5.js
index 9b156ff..3f1cdbc 100644
--- a/node_modules/vue-loader/lib/plugin-webpack5.js
+++ b/node_modules/vue-loader/lib/plugin-webpack5.js
@@ -20,12 +20,14 @@ const ruleSetCompiler = new RuleSetCompiler([
new BasicMatcherRulePlugin('realResource'),
new BasicMatcherRulePlugin('issuer'),
new BasicMatcherRulePlugin('compiler'),
+ new BasicMatcherRulePlugin("issuerLayer"),
new DescriptionDataMatcherRulePlugin(),
new BasicEffectRulePlugin('type'),
new BasicEffectRulePlugin('sideEffects'),
new BasicEffectRulePlugin('parser'),
new BasicEffectRulePlugin('resolve'),
new BasicEffectRulePlugin('generator'),
+ new BasicEffectRulePlugin("layer"),
new UseEffectRulePlugin()
]) generated with https://www.npmjs.com/package/patch-package |
Actually, |
vue-loader v17.0.0 was released but this still not fixed, is there something new please @yyx990803 ? Webpack layer is great feature which improves build time for more flavor/variants. UPDATE: created reproducible repo https://github.com/nolimitdev/vue-loader-webpack-layer-error |
Tested against 16.8.0, the problem is still present. |
Did we get any solution for this issue ?
|
I have created PR #2000 |
@nskazki patch works for me and successfully fixes following demo for webpack layers error in vue-loader https://github.com/nolimitdev/vue-loader-webpack-layer-error |
Related to #1849 but this PR doesn't fix the problem that `component.vue?type=style` doesn't inherit the layer. It only ensures that webpack does not throw, and all existing usages aren't broken by `vue-loader`.
Related to vuejs#1849 but this PR doesn't fix the problem that `component.vue?type=style` doesn't inherit the layer. It only ensures that webpack does not throw, and all existing usages aren't broken by `vue-loader`.
Version
Tested with 16.8.0, 16.1.2, and 15.9.8
Reproduction link
https://github.com/nskazki/vue-loader-and-webpack-layers
Steps to reproduce
npm run build
, get an error040fe39
where Vue Plugin isn't being used, runnpm run build
, get a compiled bundleWhat is expected?
Vue Loader isn't preventing one from using experimental features in general and layers in particular.
What is actually happening?
Can't use layers in the project utilizing Vue Loader due to
About Layers
Special Request
I would really appreciate it if you backport the fix to
vue-loader@15
because I can't upgrade to Vue@3 just yet but I'll understand if you don't.The text was updated successfully, but these errors were encountered: