-1
내 기본 HTML 파일의 CDN에서 jquery를로드 할 필요가 없도록 jquery를 내 Browserify 앱에 포함하려고합니다. 내 npm_modulesjquery를 browserify 빌드에 포함하기
npm install jquery
에 jQuery를 설치 한 후 내 모듈의 상단에 내 package.json에 마지막으로
{
"name": "bwplans",
"version": "0.1.0",
"devDependencies": {
"grunt": "~0.4.4",
"grunt-browserify": "^5.0.0",
"grunt-contrib-concat": "latest",
"grunt-contrib-jshint": "latest",
"grunt-contrib-uglify": "latest",
"grunt-contrib-watch": "latest",
"jshint-stylish": "latest",
"jquery": "latest"
}
}
과 그것을 추가 한 나는 그것을 필요로 해요 :
var $ = require('jquery');
빌드가 오류없이 실행 중이지만 아직받을 수 있습니다.
$ is not defined
빌드 된 파일을 보면 jquery가 확실히 컴파일되고 있으므로 무엇이 누락 되었습니까?