-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
[mini-css-extract-plugin] warning Conflicting order #3771
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
The ProblemIn your case, there're three such warnings:
Basically they are all complaining that the file The ordering is very clear in Create.vue:
However, the situation is different in
The Solution
Next time please consider using the forum, the Discord server or StackOverflow for questions first. But feel free to come back and open an issue if it turns out to be a bug 🙂 |
Thanks very much, your method solved my question, and i will try using the forum, the Discord server or StackOverflow for questions first. |
Regarding If you wonder how to remove only these warnings in vue-cli-3, I have done the following in chainWebpack: config => {
config.plugin('friendly-errors').tap(args => {
// the actual transformer defined by vue-cli-3
const vueCli3Transformer = args[0].additionalTransformers[0];
args[0].additionalTransformers = [
// use the actual transformer
vueCli3Transformer,
// add an other transformer that 'empty' the desired error
error => {
const regexp = /\[mini-css-extract-plugin\]\nConflicting order between:/;
if (regexp.test(error.message)) return {};
return error;
},
];
return args;
});
} |
An answer that worked perfectly for me found here : If you are using Vue CLI v3, add the code below to vue.config.js can ignore this error.
Make sure that you have install the latest mini-css-extract-plugin, which is a dependency of @vue/cli-service. Check links below for more information: webpack-contrib/mini-css-extract-plugin#250 |
Simply setting css: {
extract: process.env.NODE_ENV === 'production' ? {
ignoreOrder: true,
} : false,
} |
关于 [mini-css-extract-plugin] Conflicting order. Following module has been added: 异常的参考资料 :
解决方案(2个) :
|
Another solution - configure MiniCssExtractPlugin only when it's enabled:
|
While building the dApp, the webpack plugin mini-css-extract-plugin is warning us that the CSS order is not correct. Maintaining a clean order of the styling sections is basically not possible in Vue. Therefore it makes sense to disable this rule. vuejs/vue-cli#3771
While building the dApp, the webpack plugin mini-css-extract-plugin is warning us that the CSS order is not correct. Maintaining a clean order of the styling sections is basically not possible in Vue. Therefore it makes sense to disable this rule. vuejs/vue-cli#3771
While building the dApp, the webpack plugin mini-css-extract-plugin is warning us that the CSS order is not correct. Maintaining a clean order of the styling sections is basically not possible in Vue. Therefore it makes sense to disable this rule. vuejs/vue-cli#3771
While building the dApp, the webpack plugin mini-css-extract-plugin is warning us that the CSS order is not correct. Maintaining a clean order of the styling sections is basically not possible in Vue. Therefore it makes sense to disable this rule. vuejs/vue-cli#3771
While building the dApp, the webpack plugin mini-css-extract-plugin is warning us that the CSS order is not correct. Maintaining a clean order of the styling sections is basically not possible in Vue. Therefore it makes sense to disable this rule. vuejs/vue-cli#3771
While building the dApp, the webpack plugin mini-css-extract-plugin is warning us that the CSS order is not correct. Maintaining a clean order of the styling sections is basically not possible in Vue. Therefore it makes sense to disable this rule. vuejs/vue-cli#3771
The build shows a warning about the CSS import order. However, the warning shouldn't be relevant to us, because the CSS in each component applies only to the component: global styles all live in app.scss. Silencing the warning by changing vue.config.js according to vuejs/vue-cli#3771 (comment) The warning was: chunk component-form-draft-testing~component-form-submissions~component-submission-show [mini-css-extract-plugin] Conflicting order. Following module has been added: * css ./node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--8-oneOf-1-2!./node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!src/components/modal.vue?vue&type=style&index=0&lang=scss& despite it was not able to fulfill desired ordering with these modules: * css ./node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--8-oneOf-1-2!./node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!src/components/markdown/textarea.vue?vue&type=style&index=0&lang=scss& - couldn't fulfill desired order of chunk group(s) component-submission-show - while fulfilling desired order of chunk group(s) component-form-draft-testing, component-form-submissions
The build shows a warning about the CSS import order. However, the warning shouldn't be relevant to us, because the CSS in each component applies only to the component: global styles all live in app.scss. Silencing the warning by changing vue.config.js according to vuejs/vue-cli#3771 (comment) The warning was: chunk component-form-draft-testing~component-form-submissions~component-submission-show [mini-css-extract-plugin] Conflicting order. Following module has been added: * css ./node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--8-oneOf-1-2!./node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!src/components/modal.vue?vue&type=style&index=0&lang=scss& despite it was not able to fulfill desired ordering with these modules: * css ./node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--8-oneOf-1-2!./node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!src/components/markdown/textarea.vue?vue&type=style&index=0&lang=scss& - couldn't fulfill desired order of chunk group(s) component-submission-show - while fulfilling desired order of chunk group(s) component-form-draft-testing, component-form-submissions
To prevent breaking HMR in development mode when using the
|
One more way to ignore order using chainWebpack // add to vue.config.js
module.exports = {
chainWebpack(config) {
if (config.plugins.has('extract-css')) {
config.plugin('extract-css').tap(([definitions]) => [{
...definitions,
ignoreOrder: true,
}]);
}
},
}; |
Version
3.0.5
Reproduction link
https://github.com/elainema/-mini-css-extract-plugin-Conflicting-order
Node and OS info
node: v10.15.3, yarn 1.9.4
Steps to reproduce
yarn install
yarn run build
What is expected?
正常打包
What is actually happening?
打包报warning: chunk offer_create~offer_detail [mini-css-extract-plugin]
Conflicting order between: xxxxxx
查看并不影响结果,只是报wanring
另外vue最新cli已升级到3.5.5,当时安装时是3.0.5,本地升级后显示:success Installed "@vue/[email protected]" with binaries,
查看版本依然是3.0.5,想卸载后重新也无法卸载,求助
The text was updated successfully, but these errors were encountered: