[英]How to include Jison into Angular?
怎樣才能包括
吉森
javascript 庫到一個角度項目?
目前我得到:
./node_modules/jison/node_modules/source-map/lib/source-map/source-node.js 中的警告 8:45-52 關鍵依賴項:require 函數的使用方式無法靜態提取依賴項
和
GET http://localhost:4200/vendor.bundle.js net::ERR_CONTENT_LENGTH_MISMATCH 200 (OK) inline.bundle.js:55 Uncaught TypeError: 無法讀取webpack_require (inline.bundle.js:55) 處未定義的屬性“調用” )
安裝到你的項目 package.json
npm install jison -s
在您的 tsconfig.app.json 中,在 compilerOptions 中的類型數組中包含“節點”
"compilerOptions": {
"types": [
"node"
]
}
然后將其導入到任何 TypeScript 文件中。
import * as jison from 'jison';
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.