将语义 UI 与 Gatsby 项目集成 - 由于缺少结束 ')',构建失败

Integrating Semantic UI with a Gatsby Project - build fails due to missing closing ')'

    failed Building development bundle - 14.691s
    ERROR in ./src/semantic/semantic.less
    Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
    ModuleBuildError: Module build failed (from ./node_modules/less-loader/dist/cjs.js):
    
    ;(function ($, window, document, undefined) {
                                              ^
    Missing closing ')'

    1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
    webpack compiled with 2 errors

关注这篇文章 (https://www.artembutusov.com/webpack-semantic-ui/) and also checked out the thread here (https://github.com/Semantic-Org/Semantic-UI-LESS/issues/38)。降级 less 的版本无效。

找到了一种集成语义的方法-ui,而无需遵循上面链接的文章。

运行: npm install semantic-ui-css --save 然后在顶层index.js页面导入:import 'semantic-ui-css/semantic.min.css';