1 Star 0 Fork 308

张贵宾 / JwChat

forked from 四铢半两 / JwChat 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
webpack.config.js 1.28 KB
一键复制 编辑 原始数据 按行查看 历史
四铢半两 提交于 2020-05-26 22:34 . 修改样式
const path = require("path");
// const webpack = require("webpack");
module.exports = {
// devtool: 'source-map',
entry: "./src/components/index.js",//入口文件,src目录下的index.js文件,
mode: 'production',
output: {
path: path.resolve(__dirname, './dist'),//输出路径,就是新建的dist目录,
publicPath: '/dist/',
filename: 'helloName.min.js',
libraryTarget: 'umd',
globalObject: 'this', // 添加这个选项
umdNamedDefine: true
},
// module: {
// rules: [{
// test: /\.vue$/,
// loader: 'vue-loader'
// },
// {
// test: /\.less$/,
// use: [
// { loader: "style-loader" },
// { loader: "css-loader" },
// { loader: "less-loader" }
// ]
// },
// {
// test: /\.js$/,
// exclude: /node_modules|vue\/dist|vue-router\/|vue-loader\/|vue-hot-reload-api\//,
// loader: 'babel-loader'
// },
// {
// test: /\.(png|jpg|gif|ttf|svg|woff|eot)$/,
// loader: 'url-loader',
// query: {
// limit: 30000,
// name: '[name].[ext]?[hash]'
// }
// }
// ]
// },
// plugins: [
// new webpack.DefinePlugin({
// "process.env": {
// NODE_ENV: JSON.stringify("production")
// }
// })
// ]
}
JavaScript
1
https://gitee.com/zhangguibin/chat.git
git@gitee.com:zhangguibin/chat.git
zhangguibin
chat
JwChat
master

搜索帮助