Build separate vertical and horizontal modules

This allows separate imports for vertical and horizontal libraries, and gives a way to import the library outside of webpack.
This commit is contained in:
Ray Schamp 2016-09-19 14:39:59 -04:00
parent ff57c4e4d6
commit 1ff45f5c77
7 changed files with 25 additions and 5 deletions

13
webpack.config.js Normal file
View file

@ -0,0 +1,13 @@
var path = require('path');
module.exports = {
entry: {
horizontal: './shim/horizontal.js',
vertical: './shim/vertical.js'
},
output: {
library: 'ScratchBlocks',
libraryTarget: 'commonjs2',
path: path.resolve(__dirname, 'dist'),
filename: '[name].js'
}
};