UNPKG

zx-image-view

Version:
59 lines (57 loc) 1.22 kB
/** * Created by capricorncd 5/10/2018 * https://github.com/capricorncd */ const path = require('path') // const webpack = require('webpack') const htmlWebpackPlugin = require('html-webpack-plugin') module.exports = { entry: { 'zx-image-view': './src/js/index.js' }, output: { path: path.resolve(__dirname, '../dist'), filename: 'js/[name].js', libraryTarget: 'umd' }, module: { rules: [ { test: /\.js$/, exclude: /node_modules/, use: { loader: 'babel-loader', options: { presets: [ ['env', { modules: false }] ] } } }, { test: /\.styl$/, use: [ 'style-loader', 'css-loader', 'postcss-loader', 'stylus-loader' ] }, { test: /\.(png|jpg|jpeg|svg)$/i, loader: 'url-loader', query: { limit: 20180, name: 'img/[name]-[hash:8].[ext]' } } ] }, plugins: [ new htmlWebpackPlugin({ template: 'index.html', filename: 'index.html', inject: false }) ] }