Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modal close button is not showing after build #960

Closed
gobinda168 opened this issue Apr 13, 2020 · 5 comments
Closed

Modal close button is not showing after build #960

gobinda168 opened this issue Apr 13, 2020 · 5 comments

Comments

@gobinda168
Copy link

Versions

package version
react X.Y.Z
rsuite X.Y.Z

What is the expected behavior?

In Modal header, close button icon is not showing after build but it was visible is localhost

What is the current behavior?

What are the steps to reproduce?

Any additional comments? (optional)

@simonguo
Copy link
Member

Check if the HTML DOM element exists? If it exists, check if the font file corresponding to iconfont is loaded?

@gobinda168
Copy link
Author

gobinda168 commented Apr 16, 2020 via email

@gobinda168
Copy link
Author

image

icons get disappeared after the build.

@simonguo
Copy link
Member

You can try to deploy the font file locally.
https://rsuitejs.com/en/guide/themes

How to configure font files locally?

The icon font files used in rsuite are deployed in jsDelivr CDN,
If you want to deploy locally, you need to modify the path to the icon font:

@icon-font-path: './fonts';

In addition, you will also need to configure url-loader in webpack to load icon font files, webpack 4 configuration example:

{
  test: /\.(woff|woff2|eot|ttf|svg)($|\?)/,
  use: [
    {
      loader: 'url-loader',
      options: {
        limit: 1,
        size: 16,
        hash: 'sha512',
        digest: 'hex',
        name: '[hash].[ext]',
        publicPath: '/'
      }
    }
  ]
}

@SevenOutman
Copy link
Member

Hi @gobinda168, I'm closing this issue as it seems to have been resolved. Feel free to re-open if it's actually not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants