webpack4.0如何配置antd样式
How to configure antd style in webpack4.0
我用webpack4.0+react+mobx+antd搭建了一个脚手架,但是我不知道如何配置antd样式。 antd 组件已经渲染,但是没有样式...
如果我使用像
这样的旧配置
["import", { "libraryName": "antd", "libraryDirectory": "es", "style": "css" }]
webpackdevserver 会抛出错误
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.plugins[1] should be one of these:
object { apply, ... } | function
-> Plugin of type object or instanceof Function
Details:
* configuration.plugins[1] misses the property 'apply'.
function
-> The run point of the plugin, required method.
* configuration.plugins[1] misses the property 'apply'.
function
-> The run point of the plugin, required method.
* configuration.plugins[1] should be an instance of function
-> Function acting as plugin
这是我的 linking 错误,只是 link less-loader
我用webpack4.0+react+mobx+antd搭建了一个脚手架,但是我不知道如何配置antd样式。 antd 组件已经渲染,但是没有样式...
如果我使用像
这样的旧配置["import", { "libraryName": "antd", "libraryDirectory": "es", "style": "css" }]
webpackdevserver 会抛出错误
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.plugins[1] should be one of these:
object { apply, ... } | function
-> Plugin of type object or instanceof Function
Details:
* configuration.plugins[1] misses the property 'apply'.
function
-> The run point of the plugin, required method.
* configuration.plugins[1] misses the property 'apply'.
function
-> The run point of the plugin, required method.
* configuration.plugins[1] should be an instance of function
-> Function acting as plugin
这是我的 linking 错误,只是 link less-loader