Twitter bootstrap 如何在遗留结构项目中集成webpack?
我以“传统方式”创建了一个小项目,我想集成webpack。该项目使用angularjs和bootstrap 我不想修改我的代码库。我只捆绑js文件Twitter bootstrap 如何在遗留结构项目中集成webpack?,twitter-bootstrap,twitter-bootstrap-3,webpack,Twitter Bootstrap,Twitter Bootstrap 3,Webpack,我以“传统方式”创建了一个小项目,我想集成webpack。该项目使用angularjs和bootstrap 我不想修改我的代码库。我只捆绑js文件 module.exports = { entry: { app: './src/main.js', others: ['...', '...'] vendor: [ 'jquery', 'bootstrap', 'angul
module.exports = {
entry: {
app: './src/main.js',
others: ['...', '...']
vendor: [
'jquery',
'bootstrap',
'angular',
'angular-route'
]
},
output: {
path: path.join(__dirname, 'dist'),
filename: '[name].bundle.js'
},
plugins: [
new webpack.ProvidePlugin({
'$': 'jquery',
'jQuery': 'jquery',
'window.jQuery': 'jquery'
})
]}
在index.html中,我只包括app.bundle.js、others.bundle.js和vendor.bundle.js
构建工作正常。但当然,引导js代码不会被执行(因此navbar切换在小型设备上不起作用)。有没有办法让它与引导一起工作?我必须要求/导入引导吗?试试看
您确定从您的数据库中引用引导时一切都正常吗
html文件
我刚才看到你写了一篇文章,没有从html中添加对引导的引用。 我想这可能就是问题所在