3 Star 2 Fork 2

yyma/vue-widget-date

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
webpack.config.js 1.53 KB
一键复制 编辑 原始数据 按行查看 历史
yyma 提交于 2019-05-30 18:16 . 一个仿广点通的时间选择程序
const path = require('path')
const VueLoaderPlugin = require('vue-loader/lib/plugin')
const webpack=require('webpack')
module.exports = {
devtool: 'cheap-module-source-map',
entry: './src/index.js',
output: {
path: path.resolve(__dirname, './dist/'),
filename: 'index.js',
library: 'vue-timetable',
libraryTarget: 'umd',
umdNamedDefine: true
},
resolve: {
extensions: ['.js', '.vue'],
alias: {
'vue$': 'vue/dist/vue.common.js'
}
},
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
plugins: ['@babel/transform-runtime']
}
}
},
{
test: /\.vue$/,
loader: 'vue-loader'
},
{
test: /\.css$/,
use: [
'style-loader',
'css-loader'
]
},
{
test: /\.(eot|svg|ttf|woff|woff2)(\?\S*)?$/,
loader: 'file-loader'
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
},
{
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
loader: 'url-loader',
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
}
]
},
mode: "production",
plugins: [
new webpack.ProvidePlugin({
$:'jquery',
jQuery:'jquery'
}),
// 请确保引入这个插件!
new VueLoaderPlugin()
]
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/codeMay/vue-widget-date.git
git@gitee.com:codeMay/vue-widget-date.git
codeMay
vue-widget-date
vue-widget-date
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385