mini-toastr
mini-toastr copied to clipboard
webpack build error
ERROR in app.6d3a54eaa463666161b3.js from UglifyJs
Unexpected token: punc ()) [./node_modules/mini-toastr/mini-toastr.js:12,0][app.6d3a54eaa463666161b3.js:245,14]
I have same program
Same problem with latest version. Any solution or workaround?
i have same problem
any solution for this?
rollback old version
Also experiencing same issue. I'm using babel es2016, stage-0, and polyfill. Downgrading to 0.6.6 resolved the issue.
edit webpack.base.conf
{
test: /\.js$/,
loader: 'babel-loader',
include: [
resolve('src'),
resolve('test'),
resolve('node_modules/mini-toastr')
]
}
First of all - I'll fix it soon.
This issue related to ES6, basically for now you have to do translation es6->es5 for mini-toastr
If you end up here after trying to track down an webpackjasonp is not defined(I only saw this while using internet explorer) error and trace it back to mini-toastr. Just use babel for to translate it to es5
@zhenhappy solution close to what i needed .
{
test: /\.js$/,
exclude: /node_modules\/(?!(mini-toastr)\/).*/ ,
use: {
loader: 'babel-loader',
options: {
presets: ['env']
}
}
}