Skip to content

Instantly share code, notes, and snippets.

@danawoodman
Created November 15, 2016 22:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danawoodman/91b9e4dd727fd19c7dba021b05157dba to your computer and use it in GitHub Desktop.
Save danawoodman/91b9e4dd727fd19c7dba021b05157dba to your computer and use it in GitHub Desktop.
const path = require('path')
const NODE_ENV = process.env.NODE_ENV || 'development'
const outputFile = 'pdfmake.js'
const libraryName = 'pdfmake'
const config = {
entry: './src/browser-extensions/pdfMake.js',
output: {
path: path.join(__dirname, './build'),
filename: outputFile,
library: libraryName,
libraryTarget: 'umd',
umdNamedDefine: true,
},
node: {
fs: 'empty',
},
module: {
loaders: [
{
test: /\.json$/,
loader: 'json',
},
{
test: /\.js$/,
exclude: /(node_modules)/,
loader: 'babel',
cacheDirectory: true,
},
],
postLoaders: [
{
loader: 'transform?brfs',
},
],
},
}
if (NODE_ENV === 'test' || NODE_ENV === 'development') {
config.debug = true
config.devtool = 'eval'
}
module.exports = config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment