From 4b3d812031dd07c251623d7155159115e99d2671 Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Mon, 28 Aug 2017 22:54:26 -0500 Subject: Commit everything hastily I left evertything until the last minute, so I didn't have a chance to do it nicely. SORRY. --- config/webpack.js | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 config/webpack.js (limited to 'config/webpack.js') diff --git a/config/webpack.js b/config/webpack.js new file mode 100644 index 0000000..98faf6d --- /dev/null +++ b/config/webpack.js @@ -0,0 +1,41 @@ +'use strict'; + +const Path = require('path'); + +module.exports = { + entry: './lib/sorting_hat', + + output: { + path: Path.resolve(__dirname, '../assets'), + filename: 'bundle.js', + publicPath: '/assets/', + library: 'SortingHat', + libraryTarget: 'umd' + }, + + module: { + loaders: [ + { + test: /\.js$/, + exclude: /doc/, + loader: 'babel-loader', + query: { + presets: ['es2017'] + } + } + ] + }, + + resolve: { + modules: [ + 'node_modules', + 'lib' + ], + + alias: { + 'vue$': 'vue/dist/vue.esm.js' + } + }, + + context: Path.resolve(__dirname, '..') +}; -- cgit