在 Gatsby 中为 IE11 启用自动前缀(特别是)网格

Enabling autoprefixing (specifically) grid for IE11 in Gatsby

我很难让网格与我的 Gatsby 站点一起使用。我通过 gatsby-plugin-sass 插件使用 SASS 并指定选项。这是我在网上找到的确切配置:

{
    resolve: 'gatsby-plugin-sass',
    options: {
        postCssPlugins: [
            autoprefixer({
                grid: true
            }),
        ],
    },
}

放在我的 gatbsy-config.js.

我的 .browserslistrc 有以下内容:

last 2 version
> 1%
IE 10

但我仍然无法正确显示网格。

任何suggestions/ideas?

您不需要使用选项,grid: true 或 grid: autoplace 对我来说没有任何改变。 /* autoprefixer grid: autoplace */ 在 .scss 的开头,或者 .module.scss 工作正常(就像@ksav 写的)