UNPKG

test-whiteboard

Version:

https://gitlab.gridsum.com/gov_law_tech/FrontEnd/whiteboard

65 lines (44 loc) 1.24 kB
var webpack = require('webpack'); var path = require('path'); var TransferWebpackPlugin = require('transfer-webpack-plugin'); const MinifyPlugin = require("babel-minify-webpack-plugin"); var CopyWebpackPlugin = require('copy-webpack-plugin'); /** watch:true, watchOptions: { aggregateTimeout: 200, poll: 500 }, **/ module.exports = { entry: './index.js', output: { path: path.resolve(__dirname, 'dist'), filename: 'gsum-whiteboard.js', library:'GsumWhiteboard', libraryTarget:'umd' }, module:{ rules: [ { test: /\.js$/, exclude: /(node_modules|bower_components)/, use: { loader: 'babel-loader', options: { presets: ['es2015'] } } } ] }, plugins: [ new CopyWebpackPlugin([ { from: path.resolve(__dirname, './dist'), to: path.resolve(__dirname, '../frontend/libs/gsum-whiteboard'), ignore: ['.*'] } ]) ] };