main.js
let jquery = require("../Scripts/jquery-2.2.4.js");
let bootstrap = require("../Scripts/bootstrap.js");
let angular = require("../Scripts/angular.js");
let ngRoute = require("../Scripts/angular-route.js");
let messages = require("../Scripts/angular-messages.js");
let appmodule = require("../app.module.js");
let appconfig = requre("../ap.config.js");
let service = require("../service.js");
let homemodule = require("../home-view/home-view.module.js");
let homecomponent = requre("../home-view/home-view.component.js");
let editmodule = require("../edit-view/edit-view.module.js");
let editcomponent = requre("../edit-view/edit-view.component.js");
let addmodule = require("../add-view/add-view.module.js");
let addcomponent = requre("../add-view/add-view.component.js");
webpack config
var HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: "./main.js", //relative to root of the application
output: {
path: __dirname,
filename: "../app.bundle.js" //relative to root of the application
},
watchOptions: {
aggregateTimeout: 300,
poll: 1000
},
plugins: [
new HtmlWebpackPlugin({
hash: true,
title: 'My Interviewe Evaluation',
myPageHeader: 'interviewee',
template: '../_index.html',
filename: '../index.html' //relative to root of the application
})
]
}
运行应用程序后,出现此错误:Bootstrap需要jQuery。我该如何解决?在使用webpack之前,该项目按预期工作。