我正在使用此模板来设置项目:https://github.com/wmaurer/react-hot-boilerplate-ts
当做npm开始时我得到错误(最终):
ERROR in ./src/index.tsx
Module build failed: TypeError: compiler.parseConfigFile is not a function
at ensureTypeScriptInstance (C:\Users\mslavsky\Desktop\react-hot-boilerplate-ts-master\node_modules\ts-loader\index.js:147:38)
at Object.loader (C:\Users\mslavsky\Desktop\react-hot-boilerplate-ts-
master\node_modules\ts-loader\index.js:365:14)
@ multi main
webpack: Failed to compile.
有人可以帮忙吗?我也做了npm安装
答案 0 :(得分:0)
我建议你看看这个项目:https://github.com/jquintozamora/react-typescript-webpack2-cssModules-postCSS
在那里你可以看到WebPack 2,React Hot Loader,TypeScript和React
的配置