在项目中使用angular 2 webpack bootstrap
我想使用自定义主题进行引导 - 用 ./Content/bootstrap.min.css 替换 node_modules/../bootstrap.css
我为此添加了别名
alias: {
'bootstrap/dist/css/bootstrap.css': './Content/bootstrap.min.css',
}
但有错误
无法解析'\ Content'中的'../fonts/glyphicons-halflings-regular.eot'
@ ./Content/bootstrap.min.css
如何替换文件但不更改依赖资源的文件夹
例
glyphicons-halflings-regular.eot必须在\ node_modules中搜索,而不是在Content中搜索
2 回答
也许另一个别名说:
看起来有点hacky,但也许试一试 .
您可以使用CopyWebpackPlugin加载css,js文件 . 尝试此代码
npm install copy-webpack-plugin --save-dev