mini-toastr icon indicating copy to clipboard operation
mini-toastr copied to clipboard

webpack build error

Open zanjs opened this issue 7 years ago • 9 comments

ERROR in app.6d3a54eaa463666161b3.js from UglifyJs
Unexpected token: punc ()) [./node_modules/mini-toastr/mini-toastr.js:12,0][app.6d3a54eaa463666161b3.js:245,14]

zanjs avatar Dec 27 '17 11:12 zanjs

I have same program

zhenhappy avatar Dec 29 '17 09:12 zhenhappy

Same problem with latest version. Any solution or workaround?

priyank780 avatar Jan 13 '18 05:01 priyank780

i have same problem

ahmad-nasikin avatar Feb 08 '18 16:02 ahmad-nasikin

any solution for this?

pdelacruz86 avatar Feb 22 '18 15:02 pdelacruz86

rollback old version

zhenhappy avatar Feb 24 '18 02:02 zhenhappy

Also experiencing same issue. I'm using babel es2016, stage-0, and polyfill. Downgrading to 0.6.6 resolved the issue.

gegana avatar Feb 27 '18 22:02 gegana

edit webpack.base.conf

{
  test: /\.js$/,
  loader: 'babel-loader',
  include: [
    resolve('src'),
    resolve('test'),
    resolve('node_modules/mini-toastr')
  ]
}

zhenhappy avatar Mar 10 '18 02:03 zhenhappy

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

se-panfilov avatar Apr 12 '18 10:04 se-panfilov

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']
            }
          }
        }

RealWeeks avatar Jul 13 '18 14:07 RealWeeks