海了个螺 - webpack
type: channel
link: https://www.nnnuo.com/tag/webpack/
items: webpack打包非模块化js

webpack打包非模块化js
type: item
date: 2019-08-16T17:07:00+08:00
description: 新建一个空白项目，将entry的参数设置为你要打包的非模块化js，output里面为输出配置，配置完成后切入当前命令运行webpackconst path = require('path'); module.exports = { entry: { login : './src/login.js', member_home : './src/member.js', member_index : './src/index.js', member_keywordlist : './src/list.js', member_keywordmanage : './src/manage.js', }, output : { filename : '[name].js', path : path.resolve('dist/js/') } }