We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
创建两个entry入口文件
$ cd src && mkdir entry1.js entry2.js
entry1.js
document.write('<h1>用友网络FED团队</h1>');
entry2.js
document.write('<h1>webpack完全教程</h1>');
index.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Webpack 完全教程</title> </head> <body> <script src="./dist/entry1.js"></script> <script src="./dist/entry2.js"></script> </body> </html>
webpack.config.js
const path = require('path'); module.exports = { entry: { bundle1: './src/entry1.js', bundle2: './src/entry2.js' }, output: { path: './dist', filename: '[name].js' } };
运行
$ npm run dev
The text was updated successfully, but these errors were encountered:
No branches or pull requests
多入口文件编译
创建两个entry入口文件
entry1.js
entry2.js
index.html
webpack.config.js
运行
The text was updated successfully, but these errors were encountered: