1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-24 18:32:22 +00:00

Add script suffix to prevent error

增加文件后缀,否则会报错 `Error [ERR_MODULE_NOT_FOUND]`
This commit is contained in:
Chenwei Xiao 2021-10-31 19:18:47 +08:00 committed by GitHub
parent cee42e6227
commit 728b545742
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,7 +109,7 @@ export function mixins(...list) {
}
// main.js
import { mixins } from './mixins'
import { mixins } from './mixins.js'
const Foo = {
foo() { console.log('foo') }
@ -591,7 +591,7 @@ export function mixins(...list) {
然后,就可以使用上面这个装饰器,为类“混入”各种方法。
```javascript
import { mixins } from './mixins';
import { mixins } from './mixins.js';
const Foo = {
foo() { console.log('foo') }