An error is reported when using the iview framework toast component in mpvue

error when using iview framework toast components in mpvue
Module parse failed: Unexpected token (17:8)
You may need an appropriate loader to handle this file type.

page introduces
const {$Toast} = require (".. / static/iview/toast/index");

 handleWarning() {
      $Toast({
        content: "",
        type: "warning"
      });
    },

error details
clipboard.png

Have you solved

? I also encountered


.

you have the wrong path, and this is how I introduced it. Pay attention to base

improt {$Toast} from '../../../../static/iview/base/index'

can you see how you introduce iview components with mpvue? Directly put wxml,wxss, etc., into a folder, and then require


how to solve


here the ES6 syntax is used. You can turn on ES6 to ES5

in the details of Wechat's development tool.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3ae29-2af91.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3ae29-2af91.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?