【发布时间】:2019-01-04 14:35:39
【问题描述】:
我在 Brunch 中使用 Less,但我的 boostrap/font-awesome 插件无法正常工作。 我的目标是使用 Bootstrap 和 Font-Awesome 作为节点模块。
exports.config = {
// See http://brunch.io/#documentation for docs.
files: {
javascripts: {
joinTo: "js/app.js"
},
stylesheets: {
joinTo: "css/app.css",
order: {
after: ["web/static/css/app.less"] // concat app.css last
}
},
templates: {
joinTo: "js/app.js"
}
},
conventions: {
assets: /^(web\/static\/assets)/
},
// Phoenix paths configuration
paths: {
public: "../priv/static"
},
// Configure your plugins
plugins: {
babel: {
presets: ["env", "react"],
ignore: [/(web\/static\/vendor)|node_modules/]
},
less: {
options: {
paths: ["node_modules/font-awesome/less", "node_modules/bootstrap/less"]
}
},
copycat: {
"fonts" : ["static/fonts", "node_modules/font-awesome/fonts"],
verbose : false,
onlyChanged: true
}
},
modules: {
autoRequire: {
"js/app.js": ["js/app"]
}
},
npm: {
enabled: true,
globals: {
$: 'jquery',
jQuery: 'jquery',
React: 'react',
bootstrap: 'bootstrap',
Tether: 'tether',
Popper: 'popper.js',
},
}
}
我的 app.less 文件有导入:
@import 'font-awesome';
@import "bootstrap.less";
但我不断收到错误bootstrap.less' was not found。我该如何解决这个问题?
【问题讨论】:
标签: twitter-bootstrap less brunch