buptlhuanyu / react-music-lhy Goto Github PK
View Code? Open in Web Editor NEW基于react16+ react-router4+ typescript react-redux的移动端音乐播放器
License: GNU General Public License v3.0
基于react16+ react-router4+ typescript react-redux的移动端音乐播放器
License: GNU General Public License v3.0
你好,我按照文中所述分别设置了paths,alias,tsconfig后依然无法使用别名。。
paths.js:
componentPath: resolveApp('src/app/components')
tsconfig.json:
"baseUrl": "src", "paths": { "src/*":["src/*"], "components/*":["src/app/components/*"] },
webpack.config.js
'components': paths.componentPath
报错:
Cannot find module 'components/home/index'. TS2307
ERROR in C:\Users\Administrator\Desktop\webpack4\src\index.tsx(11,1)
TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.
//////////////////////////////////////////////////
const NotFound = Loadable({
loading,
loader: () => {return import(/* webpackChunkName: "NotFound" */"../pages/NotFound")}
});
使用时这样的,好像是我webpack 配置的问题
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"": ["types/"]
},
"jsx": "react",
"lib": ["esnext", "dom.iterable","dom"],
"rootDir": "src",
"module": "esnext",
"target": "es5",
"sourceMap": true,
"moduleResolution": "node",
"noImplicitReturns": true,
"noImplicitThis": true,
"noImplicitAny": true,
"strictNullChecks": true,
"experimentalDecorators": true,
"allowJs": true,
},
"files": [
"images.d.ts"
],
"include": [
"./src/*"
],
"exclude": [
"build"
],
"noImplicitAny": false
}我应该怎么改,我扣扣2385943935,请赐教
Failed to compile
C:/Users/74274/Desktop/src/react/react-music-lhy/src/app/components/player/Player.tsx
Type error: Could not find a declaration file for module 'lyric-parser'. 'C:/Users/74274/Desktop/src/react/react-music-lhy/node_modules/lyric-parser/dist/lyric.js' implicitly has an 'any' type.
但是我在node_modules里面是有这个包的
为什么搜索的输入框focus的时候outline是黄色的,可是我本地默认的是蓝色的,我也搜索了全局也没发现哪里有变动了outline
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.