Skip to content

Commit

Permalink
Silence build warning about CSS import order
Browse files Browse the repository at this point in the history
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
  • Loading branch information
matthew-white committed Sep 29, 2021
1 parent d1f4f3d commit cbb405c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/components/form-draft/status.vue
Expand Up @@ -85,12 +85,10 @@ import FormDraftChecklist from './checklist.vue';
import FormDraftPublish from './publish.vue';
import FormNew from '../form/new.vue';
import FormVersionStandardButtons from '../form-version/standard-buttons.vue';
// Import PageSection before SummaryItem (in FormVersionSummaryItem) in order to
// have the same import order as other components: see
// https://github.com/vuejs/vue-cli/issues/3771
import PageSection from '../page/section.vue';
import FormVersionSummaryItem from '../form-version/summary-item.vue';
import Loading from '../loading.vue';
import Option from '../../util/option';
import modal from '../../mixins/modal';
import routes from '../../mixins/routes';
Expand Down
2 changes: 0 additions & 2 deletions src/components/form-draft/testing.vue
Expand Up @@ -49,8 +49,6 @@ except according to the terms contained in the LICENSE file.
</template>

<script>
// Import PageSection before FloatRow in order to have the same import order as
// FormSubmissions: see https://github.com/vuejs/vue-cli/issues/3771
import PageSection from '../page/section.vue';
import FloatRow from '../float-row.vue';
import CollectQr from '../collect-qr.vue';
Expand Down
3 changes: 3 additions & 0 deletions vue.config.js
Expand Up @@ -10,6 +10,9 @@ including this file, may be copied, modified, propagated, or distributed
except according to the terms contained in the LICENSE file.
*/
module.exports = {
css: {
extract: { ignoreOrder: true }
},
chainWebpack: (config) => {
config.module
.rule('json5')
Expand Down

0 comments on commit cbb405c

Please sign in to comment.