0
我成功使用此bootstrap CSS和字体,但下拉不起作用,并且在控制台中看不到任何错误,因此我无法调试该问题。似乎我需要做一些事情,包括从node_modules\bootstrap\js\
dropdown.js
,但如何做到这一点在“webpacking”方式?在webpack中包含引导程序js模块
的package.json:
...
"dependencies": {
"bootstrap": "*",
"jquery": "*",
"vue-resource": "*",
"vue-router": "*",
"vue": "*"
}
...
webpack.config.js
module.exports = {
// the main entry of our app
entry: ['./src/index.js', './src/auth/index.js'],
// output configuration
output: {
path: __dirname + '/build/',
publicPath: 'build/',
filename: 'build.js'
},
module: {
loaders: [
// process *.vue files using vue-loader
{test: /\.vue$/, loader: 'vue'},
// process *.js files using babel-loader
// the exclude pattern is important so that we don't
// apply babel transform to all the dependencies!
{test: /\.js$/, loader: 'babel', exclude: /node_modules/}
]
},
devServer: {
headers: {"Access-Control-Allow-Origin": "*"}
},
babel: {
presets: ['es2015'],
plugins: ['transform-runtime']
}
}
有些手册介绍如何使用另一个包bootstrap-webpack。我不明白什么区别,我还需要使用包装insted的引导,从拼焊板