var webpack = require('webpack')
module.exports = {
resolve: {
extensions: [
'',
'.js',
'.coffee'
]
},
entry: './src/index.coffee',
output: {
path: __dirname + '/dist/',
filename: 'payment.js',
library: 'payment',
libraryTarget: 'var',
},
module: {
loaders: [
{ test: /\.json/, loader: "json-loader" },
{ test: /\.coffee$/, loader: "coffee-loader" },
]
}
};
-
Jesse Pollak authored
BREAKING CHANGE: we now distribute the library in two different ways: * the npm "main" is now `lib/index.js`, which is ES5 with require statements, compatible with webpack and browserify * the `dist/payment.js` is a pre-built JS file that can be included in <script> tags
9abbb203