我在部署netlify时遇到了问题,有些冲突我不明白。我尝试过清除缓存,重建基础,重建包,重新部署在netlify上,重新安装mini提取-插件。
调试Netlify:
11:38:12上午:警告块样式迷你-css-提取-插件11:38:12上午:冲突的顺序。添加了以下模块: 11:38:12 AM:* css ./node_modules/gatsby/node_modules/css-loader??ref--12-oneOf-1-1!./node_modules/postcss-loader/lib??postcss-2!./node_modules/typeface-roboto/index.css 11:38:12 AM:尽管无法用这些模块完成所需的排序: 11:38:12 AM:* css ./node_node/gatsby/node_node/css-loader??ref--12-oneOf-1-1!./node_modules/postcss-loader/lib??postcss-2!./node_modules/typeface-montserrat/index.css 11:38:12 AM:-无法满足块组组件的期望顺序--src-pages 404-js
它的意思是什么以及如何修复它?
"css-loader": {
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/css-loader/-/css-loader-3.4.2.tgz",
"integrity": "sha512-jYq4zdZT0oS0Iykt+fqnzVLRIeiPWhka+7BqPn+oSIpWJAHak5tmB/WZrJ2a21JhCeFyNnnlroSl8c+MtVndzA==",
"requires": {
"camelcase": "^5.3.1",
"cssesc": "^3.0.0",
"icss-utils": "^4.1.1",
"loader-utils": "^1.2.3",
"normalize-path": "^3.0.0",
"postcss": "^7.0.23",
"postcss-modules-extract-imports": "^2.0.0",
"postcss-modules-local-by-default": "^3.0.2",
"postcss-modules-scope": "^2.1.1",
"postcss-modules-values": "^3.0.0",
"postcss-value-parser": "^4.0.2",
"schema-utils": "^2.6.0"
}
},
"mini-css-extract-plugin": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.8.2.tgz",
"integrity": "sha512-a3Y4of27Wz+mqK3qrcd3VhYz6cU0iW5x3Sgvqzbj+XmlrSizmvu8QQMl5oMYJjgHOC4iyt+w7l4umP+dQeW3bw==",
"requires": {
"loader-utils": "^1.1.0",
"normalize-url": "1.9.1",
"schema-utils": "^1.0.0",
"webpack-sources": "^1.1.0"
}
},发布于 2020-05-18 14:10:54
这些警告是错误的订单输入CSS模块,因为webpack的配置。您可以通过在gatsby-node.js中添加以下代码段来删除它们
exports.onCreateWebpackConfig = ({ stage, actions, getConfig }) => {
if (stage === 'build-javascript') {
const config = getConfig()
const miniCssExtractPlugin = config.plugins.find(
plugin => plugin.constructor.name === 'MiniCssExtractPlugin'
)
if (miniCssExtractPlugin) {
miniCssExtractPlugin.options.ignoreOrder = true
}
actions.replaceWebpackConfig(config)
}
}https://stackoverflow.com/questions/59877142
复制相似问题