tree-select icon indicating copy to clipboard operation
tree-select copied to clipboard

style is not loading

Open sali1982 opened this issue 5 years ago • 2 comments
trafficstars

Hi,

I am using this componet in my application but there is no style for it. I have Css loader in my webpack.

Not sure what the issue could be.

sali1982 avatar Mar 07 '20 05:03 sali1982

Hi @sali1982,

I am missing that part of the readme too, unfortunately, as you can look in npm-package, there are few less files which are pointed out to http://npmjs.com/rc-tree/ specifically on https://github.com/react-component/tree/blob/master/assets/index.less ... And no output css file is present in the npm package...

I have to migrate to https://vue-treeselect.js.org/ for now with https://github.com/akxcv/vuera

Strnadj avatar Jun 15 '20 10:06 Strnadj

I can only advise on how to fix this with webpack, but the way that I fixed it was to add these rules to my webpack config.

module: {
    rules: [
      {
        test: /\.less$/i,
        use: [
          {
            loader: "style-loader",
          },
          {
            loader: "css-loader",
          },
          {
            loader: "less-loader",
          },
        ],
      },
    ],
  },

You can find more advice on how to set this up on the less-loader npm page.

In addition, I could not use less-loader 8.0 I had to downgrade to 7.3 in order to get this to work. I hope this helps someone else running into the same issue.

cogwizzle avatar Apr 14 '21 13:04 cogwizzle