-1
Noty 버전 3 https://github.com/needim/noty을 사용하고 있습니다. 필요에 따라 사용하거나 수입해야하는 문서에 따르면."가져 오기"또는 "필요"하지 않음
import Noty from 'noty';
new Noty({
text: 'Notification text'
}).show();
// or
const Noty = require('noty');
new Noty({
text: 'Notification text'
}).show();
아무 것도 작동하지 않습니다. Chrome의 마지막 버전에서도.
내가 사용
가 필요합니다Uncaught ReferenceError: require is not defined
때 수입 :
Uncaught SyntaxError: Unexpected token import
을 시도하도록 설정된 REPO here있어? –
왜 그냥'script' 태그를 사용하여 그것을 포함하지 않습니까? – Luca
require는 서버 측 nodeJS의 일부입니다. 브라우저 코드의 경우 '