A
A
alzow2019-01-13 14:48:09
webpack
alzow, 2019-01-13 14:48:09

Vue-CLI / Webpack / Vuejs-noty does not work in older browsers. Is there a way to fix?

I am developing a project on Vuejs, and on the server in old browsers the frontend will fall off and the user will see a white screen. The error is the following:

SyntaxError: Use of const in strict mode. (Most recent call first)

File webpack:///./node_modules/vuejs-noty/dist/vuejs-noty.js line 8 col 57 in t
!function(e,n){t.exports=n()}(0,function(){"use strict";function t(t){return"function"==typeof t|...

Tried adding 'vuejs-noty' to transpileDependencies but then the frontend doesn't build anymore with an error
Uncaught TypeError: Cannot set property 'vuejs-noty' of undefined

Installed Vuejs-noty like this:
npm install --save vuejs-noty
Connected like this:
import VueNoty from 'vuejs-noty'
import 'vuejs-noty/dist/vuejs-noty.css'

Vue.use(VueNoty, {timeout: 2000, progressBar: true, layout: 'topRight', theme: 'bootstrap-v4'});

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Klein Maximus, 2019-01-14
@kleinmaximus

https://cli.vuejs.org/ru/guide/browser-compatibili...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question