UNPKG

dom-tools

Version:

A tiny collection of DOM helpers for IE8+.

41 lines (30 loc) 845 B
var path = require('path'); var webpack = require('webpack'); var entry = {}; if (process.env.NODE_ENV === 'production') { entry['dom-tools.min'] = './src/index.js'; } else { entry['dom-tools'] = './src/index.js'; } module.exports = { entry: entry, // options affecting the output. output: { // Absolute path to output our bundle file. We build into Flask default static dir. path: path.resolve(__dirname, 'dist'), // The filename of the entry chunk as relative path inside the `output.path` dir filename: '[name].js', // name of the global var: "Mondavi" library: 'DOMTools', // export itself to a global var libraryTarget: 'umd' }, module: { loaders: [ {test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader'} ] }, resolve: { extensions: ['', '.js'] } };