我正在使用一些第三方模块,它们有自己的CSS文件。 我想将它们包含在我的应用程序的单个CSS文件中,该文件由Webpack处理。 如何将“node_modules”下的CSS文件导入到我的CSS文件中?
例如,我正在使用第三方 react-select
模块,但我无法从 node_modules
导入其CSS文件:
@import 'react-select/dist/react-datetime.css';
在webpack.config.js
文件中的相关加载器:
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
use: [
{
loader: 'css-loader',
options: {
url: false
}
}
]
})
}