如何在visual studio ASP.NET核心项目中使用semantic-ui-react?

How to use semantic-ui-react in visual studio ASP.NET Core project?

假设我们已经按照这个 ReactJS.Net tutorial Now we want to add semantic-ui-react 到我们的 React 组件,以便它们看起来不错。然而,没有 Bower 或 NuGet semantic-ui-react 包,只有 Semantic-UI 这无济于事。那么如何在具有 ASP.NET Core 的 VS2017 上使用语义-ui-react?

我从未使用过 ReactJS.NET 也不是 .NET 专家,但我从您指出的文档中了解到您可以使用 Webpack.

Webpack is a popular module bundling system built on top of Node.js. It can handle not only combination and minification of JavaScript and CSS files, but also other assets such as image files (spriting) through the use of plugins. Webpack can be used as an alternative to Cassette or ASP.NET Combination and Minification. This guide assumes you have already installed Webpack.

有了这个解释,我们可以假设您可以使用 npm 安装 semantic-ui-react 并配置 Webpack,这样您就可以按照此处所述使用组件。

@Html.React("Components.CommentsBox", new {
  initialComments = Model.Comments
})