This works with jspdf.debug.js.
I am using webpack 1.13.1. to reproduce, simply install jspdf
here's my webpack.config
import path from 'path';
import webpack from 'webpack';
const DEBUG = process.argv.includes('dev');
const VERBOSE = process.argv.includes('verbose');
export default {
entry: './src/app.js',
output: {
path: path.resolve('./public'),
publicPath: '/public',
filename: 'app.js'
},
devtool: DEBUG ? 'eval' : 'source-map',
console: true,
cache: DEBUG,
debug: DEBUG,
stats: {
colors: true,
reasons: DEBUG,
hash: VERBOSE,
version: VERBOSE,
timings: true,
chunks: VERBOSE,
chunkModules: VERBOSE,
cached: VERBOSE,
cachedAssets: VERBOSE
},
plugins: [
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.ProvidePlugin({
'$': 'jquery',
'jQuery': 'jquery',
'_': 'underscore',
'window.jQuery': 'jquery',
'Promise': 'imports?this=>global!exports?global.Promise!es6-promise',
'fetch': 'imports?this=>global!exports?global.fetch!whatwg-fetch'
}),
...(!DEBUG ? [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production')
}
}),
new webpack.optimize.LimitChunkCountPlugin({maxChunks: 1}),
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin(),
new webpack.optimize.AggressiveMergingPlugin()
] : [])
],
resolve: {
root: [path.resolve(__dirname, '../bower_components'), path.resolve(__dirname, '../src')],
extensions: ['', '.webpack.js', '.web.js', '.js', '.jsx', '.html'],
..
}
},
module: {
loaders: [
{
test: /\.jsx?$/,
include: [path.resolve(__dirname, '../src')],
loader: 'babel-loader'
},
{
test: /\.css$/,
loader: 'style-loader!css-loader'
},
{
test: /\.less$/,
loader: 'style!css!less'
},
{
test: /\.json$/,
loader: 'json-loader'
}, {
test: /\.(txt|html)$/,
loader: 'raw-loader'
}, {
test: /\.(png|jpg|jpeg|gif|svg|woff|woff2)$/,
loader: 'url-loader?limit=10000'
}, {
test: /\.(eot|ttf|wav|mp3)$/,
loader: 'file-loader'
},
]
}
};
Just confirming that I have the same problem
Confirmed, same issue here
Seems to be addressed, fixed and already merged in https://github.com/MrRio/jsPDF/pull/774. But it's not released yet.
I'm having the same Issue here. When are you releasing it? Im using npm
Any idea when this issue with webpack will be fixed and released ?
I've also encountered this while using webpack any updates on this??
If you are installing from npm, one (ugly) way to get around this until there is a release with a fix (see #744):
In your package.json
"dependencies": {
"jspdf": "git://github.com/MrRio/jsPDF/#76edb3387cda3d5292e212765134b06150030364"
}
So you're pinning to a working commit, incurring some debt to remember to change it back to the next release.
This is now fixed in 1.3.x 馃憤 https://github.com/MrRio/jsPDF/issues/506
Most helpful comment
Any idea when this issue with webpack will be fixed and released ?