Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
Angular2 代码中的 TypeScript 错误:找不到名称“模块”
我定义了以下 Angular2 组件 import Component from angular2 core Component selector my app moduleId module id templateUrl app comp
typescript
angular
CommonJS
CommonJS 'require' 是否仍在使用或已弃用?
目前Javascript采用importES6 作为导入模块的标准方式 但是 我有时会看到使用 CommonJS 的代码require代替import 我首先想知道两个是否可以一起使用 但似乎两个不能互换 相关堆栈溢出问题 https st
javascript
es6modules
CommonJS
Angular 2 + Zone.js + Common js 模块:IF 语句异常,即使 false 情况下也会执行代码
我尝试了很多检查 这绝对是一个异常现象 我有一个 Angular 2 服务加载 type定义 typescript 2 依次加载 common js 模块 视觉媒体 调试 https stackoverflow com a 39666118
javascript
nodejs
angular
CommonJS
如果我在打字稿中使用 `module("somelib")`,它就无法在浏览器中运行
我正在尝试在客户端使用带有 angularjs 的打字稿 我发现如果我使用外部模块 生成的js将无法在浏览器中运行 控制器 ts
require
typescript
CommonJS
无法将“mysql2/promise”导入 Node.js 13 / 14 上的 ES 模块 (MJS)
从 CommonJS 迁移时 cjs 到 ES 模块 mjs 我遇到了将命名空间 CJS 导入 MJS 的问题 import mysqlPromise from mysql2 promise 返回错误 错误 ERR MODULE NOT F
javascript
nodejs
es6modules
CommonJS
es6moduleloader
Babel 6 更改了默认导出方式
之前 babel 会添加以下行module exports exports default 它不再这样做了 这意味着在我能做之前 var foo require foo use foo 现在我必须这样做 var foo require fo
javascript
ECMAScript6
babeljs
CommonJS
如何使用 gulp 构建 JavaScript 包?
我想用gulp http gulpjs com 构建 JavaScript 文件包 例如 我的项目中有以下结构 供应商 供应商1 供应商1 js 供应商 供应商2 供应商2 js js includes include1 js js inc
javascript
AMD
CommonJS
Gulp
browserify
如何使用 SystemJS 指定库依赖项?
Using SystemJS https github com systemjs systemjs 如何指定一个库依赖于另一个库 例如 引导程序 http getbootstrap com JavaScript 库依赖于jQuery htt
javascript
AMD
CommonJS
systemjs
es6moduleloader
如何解决Require.js中的循环依赖?
基本上 这个想法是 子 模块创建一个对象 并且该对象应该是作为 主 模块的实用程序库的一部分 然而 子 对象depends关于 main 的实用程序 Main module define sub function sub var utils
javascript
requireJs
AMD
circulardependency
CommonJS
Typescript 模块创建 AMD 与 Common JS
任何 Typescript 专家都可以澄清一下在使用 Typescript 时何时以及为何选择 AMD 与 Common JS 来创建模块吗 AMD 用于浏览器 例如 RequireJS 原因是它允许并行下载文件 因为网络延迟是主要瓶颈 C
module
typescript
AMD
CommonJS
在 CommonJS Node 应用程序中导入 ES6 模块?
长话短说 我正在尝试使用一个只有 ES6 模块入口点的 npm 包 即bids validator GitHub https github com bids standard bids validator 在 CommonJS 模块中 因为
javascript
nodejs
es6modules
CommonJS
ES6模块的“导入”正式兼容CommonJS和AMD?
从这篇文章 https hacks mozilla org 2015 08 es6 in deep modules https hacks mozilla org 2015 08 es6 in depth modules 文中写道 新标准旨
javascript
ECMAScript6
AMD
CommonJS
es6moduleloader
Webpack 4 多部分库和子库
Overview 我正在使用 Webpack4 和 ES6 开发一个名为 共享服务 的 javascript 库 其中包含不同的子文件夹 每个子文件夹代表一个 本地子库 其中可能包含 对其他第三个库的引用 例如lodash等 而且还 对其他
javascript
WEBPACK
ECMAScript6
CommonJS
es6modules
RequireJS:如何定义包含单个“类”的模块?
我有许多 JavaScript 类 每个类都在自己的 JavaScript 文件中实现 对于开发 这些文件是单独加载的 对于生产 它们是串联的 但在这两种情况下 我都必须手动定义加载顺序 确保如果 B 使用 A 则 B 在 A 之后 我打算
javascript
CommonJS
requireJs
从 ES5 与 ES6 编写的库导入 TypeScript
运行时出现奇怪的错误转译的依赖于外部库的 TypeScript 代码 Such as Uncaught TypeError es5 lib 1 default is not a function 怎么了 ES6 模块规范与 CommonJs
typescript
ECMAScript6
CommonJS
将变量注入 webpack
我试图将一个变量注入到 webpack 包中的每个模块中 以便获得每个文件的 JS 错误的调试信息 我已启用 node filename true webpack 中的当前文件路径 https stackoverflow com quest
javascript
requireJs
CommonJS
WEBPACK
是否可以将 requirejs 模块转换为 commonjs ?
It s 已经可以将 commonjs 模块转换为 requirejs http requirejs org docs commonjs html autoconversion 但我仍然想知道是否可以做相反的事情 有没有办法将 requir
requireJs
CommonJS
如何正确使用 ES6“导出默认值”和 CommonJS“要求”?
我一直在努力Webpack教程 http blog madewithlove be post webpack your bags 在其中一个部分中 它给出了包含该问题的一行本质的代码示例 export default class Butto
javascript
ECMAScript6
WEBPACK
CommonJS
es6moduleloader
如何在ES6模块中导入部分对象
In the 反应文档 https facebook github io react docs pure render mixin html我找到了这种导入 PureRenderMixin 的方法 var PureRenderMixin r
javascript
module
browserify
ECMAScript6
CommonJS
从“@Angular”而不是“Angular2”导入{*}
我对 Angular2 有点困惑 许多例子表明 import Component from angular core 但实际上在node module有angular2目录存在 所以从逻辑上来说应该是 import Component fr
typescript
angular
CommonJS
«
1
2
3
4
»