Created
November 15, 2016 22:44
-
-
Save danawoodman/91b9e4dd727fd19c7dba021b05157dba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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