JS - @ 在 import '@foo/bar' 中的含义
JS - meaning of @ in import '@foo/bar'
在早些时候阅读这篇 article 时,我遇到了以下代码行:
import { run } from '@cycle/core';
这让我想到了以下问题:
@
符号的意义是什么?
import 'foo/bar'
和import '@foo/bar'
有区别吗?
这是解决特定类型模块的方法吗?
我对 ES6 比较陌生,尽管 import
语法对我来说似乎非常简单 - 除了在这种情况下,@
符号的神秘存在。
我尝试使用谷歌搜索,但在 Stack Overflow、MDN 或其他地方找不到任何信息。
直接来自 Getting Started 文档:
Packages of the type @org/package are npm scoped packages, supported
if your npm installation is version 2.11 or higher. Check your npm
version with npm --version and upgrade in order to install Cycle.js.
In case you are not dealing with a DOM-interfacing web application,
you can omit @cycle/dom when installing.
在早些时候阅读这篇 article 时,我遇到了以下代码行:
import { run } from '@cycle/core';
这让我想到了以下问题:
@
符号的意义是什么?import 'foo/bar'
和import '@foo/bar'
有区别吗?
这是解决特定类型模块的方法吗?
我对 ES6 比较陌生,尽管 import
语法对我来说似乎非常简单 - 除了在这种情况下,@
符号的神秘存在。
我尝试使用谷歌搜索,但在 Stack Overflow、MDN 或其他地方找不到任何信息。
直接来自 Getting Started 文档:
Packages of the type @org/package are npm scoped packages, supported if your npm installation is version 2.11 or higher. Check your npm version with npm --version and upgrade in order to install Cycle.js.
In case you are not dealing with a DOM-interfacing web application, you can omit @cycle/dom when installing.