6

I have a fairly large Vue project that was initially created with vue-cli. I'm getting the infamous "couldn't fulfill desired order of chunk group(s)" warning when building. After much searching, I think the solution is to add ignoreOrder to the initial configuration options for mini-css-extract-plugin but I have no idea how. I think this should be done in vue.config.js. The contents of that file are:

module.exports = {
  lintOnSave: false
}

I've tried:

module.exports = {
  lintOnSave: false,
  configureWebpack: {
    plugins: [
      new MiniCssExtractPlugin({ ignoreOrder: true })
    ]
  }
}

But that gives me an error that I think means that the module was loaded twice.

I've tried:

module.exports = {
  lintOnSave: false,
  css: {
    loaderOptions: {
      ignoreOrder: true
    }
  }
}

but that gives me a syntax error.

How do I set that option?

1 Answer 1

5

According to the document, you can pass the configuration for min-css-extract-plugin by passing the options via css.extract property as following:

// vue.config.js
module.exports = {
  // ...,
  css: {
    extract: {
      ignoreOrder: true
    },
  }
};

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you, thank you, thank you, thank you! I was looking at that page but didn't associate the keyword "extract" with that plugin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.