Questions tagged «webpack-2»


14
字段“浏览器”不包含有效的别名配置
我已经开始使用webpack2(确切地说是v2.3.2),并且在重新创建配置后,我一直遇到一个我似乎无法解决的问题(对丑陋的转储表示抱歉): ERROR in ./src/main.js Module not found: Error: Can't resolve 'components/DoISuportIt' in '[absolute path to my repo]/src' resolve 'components/DoISuportIt' in '[absolute path to my repo]/src' Parsed request is a module using description file: [absolute path to my repo]/package.json (relative path: ./src) Field 'browser' doesn't contain a valid alias configuration aliased …

16
打字稿反应-找不到模块“ react-materialize”的声明文件。'path / to / module-name.js'隐式具有任何类型
我正在尝试从react-materialize中导入组件- import {Navbar, NavItem} from 'react-materialize'; 但是当webpack正在编译我的文件时,.tsx它会为上述内容引发错误- ERROR in ./src/common/navbar.tsx (3,31): error TS7016: Could not find a declaration file for module 'react-materi alize'. 'D:\Private\Works\Typescript\QuickReact\node_modules\react-materialize\l ib\index.js' implicitly has an 'any' type. 这个的任何解决方案。我不确定如何解析此导入语句以与ts-loaderwebpack一起使用。 该index.js反应-Materialise的长相很喜欢这一点。但是如何解决此问题的模块导入到我自己的文件中.. https://github.com/react-materialize/react-materialize/blob/master/src/index.js

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.