Tiny-slider: In strict mode code, functions can only be declared at top level or immediately within another function

Created on 16 Nov 2018  路  7Comments  路  Source: ganlanyuan/tiny-slider

__Issue description__: The slider is working fine, but when I try to build with webpack in production mode I'm getting this error bellow:

ERROR in 62.9c41c87ccfbd7a77606b.js from UglifyJs
In strict mode code, functions can only be declared at top level or immediately within another function. [./node_modules/tiny-slider/src/tiny-slider.js:758,0][62.9c41c87ccfbd7a77606b.js:6177,6]

Any ideas?

__Demo link/slider setting__: -

_Tiny-slider version_: 2.8.8
_Browser name && version_: -
_OS name && version_: Ubuntu 18.04.1 LTS

bug

All 7 comments

Created a merge request for this: #337

@FlorianKoerner I just installed it via npm and the problem still exists.

@santamaria7 The fix has not yet been published. Did you replace the line in packages.json with the pull request?

    "tiny-slider": "https://github.com/FlorianKoerner/tiny-slider.git",

@FlorianKoerner Actually no. I'll make the changes now. Thanks for your quick feedback.

Please check if this fix the issue.

Should work, too.

Same error
i use:

    "tiny-slider": "^2.8.8"
    "webpack": "^4.20.2"
    "uglifyjs-webpack-plugin": "^2.0.1",

npm versions 5.6.0 and 6.5.0

Solved the problem by adding external tiny-slider script.

Was this page helpful?
0 / 5 - 0 ratings