简体   繁体   English

react-hot-typescript-webpack设置问题

[英]react-hot-typescript-webpack setup issue

I'm using this template to get my project setup: https://github.com/wmaurer/react-hot-boilerplate-ts 我正在使用此模板进行项目设置: https : //github.com/wmaurer/react-hot-boilerplate-ts

When doing npm start i get the error (eventually): 在执行npm start时出现错误(最终):

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.

Can anyone help please? 有人可以帮忙吗? I did npm install as well 我也做了npm安装

I suggest you take a look this project: https://github.com/jquintozamora/react-typescript-webpack2-cssModules-postCSS 我建议您看一下这个项目: https : //github.com/jquintozamora/react-typescript-webpack2-cssModules-postCSS

There you can see configuration for WebPack 2, React Hot Loader, TypeScript and React 在那里,您可以看到WebPack 2,React Hot Loader,TypeScript和React的配置

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM