-
Is it possible to use `require` like in Electron to import NPM modules in the browsing context?
If such feature doesn't exist, is it possible to write code for the feature in JS? Or would it requir…
-
Some dependencies have updated to ecmascript-style imports, and may no longer fully support commonJs:
- got
- umzug
-
### 模块化概念
模块化就是把逻辑代码拆分成独立的块,各自封装,互相独立,每个块自行决定对外暴露什么,同时自行决定引入执行哪些外部代码。
### commonJs
Node 应用由模块组成,采用 CommonJS 模块规范。也就是说CommonJs是应用在node服务器端的,如果浏览器想使用CommonJs规范的话需要用 browserify库 来进行转化。(后面会有例子)
Co…
comTg updated
2 years ago
-
## What you are doing?
Trying to load models with models/index.js doesn't work with ES6 modules activated with `"type": "module"`
```js
const basename = path.basename(__filename);
// {...}
const …
-
Would like to use infinity via browserify and node app, would it be possible to add support for CommonJS exports and publish to NPM?
-
_Note_ I may just be missing a flag somewhere. If that is the case would love to know about it!
`common.cjs`
```
const fs = require('node:fs/promises');
console.log('IN COMMONJS LAND');
(as…
-
```js
import {encode, decode} from 'base58-universal';
import {encode, decode} from 'base58-universal';
^^^^^^
SyntaxError: Named export 'decode' not found. The requested module 'b…
-
I am facing this issue right now, not sure how to fix it. Here is my rollup.config.js
```js
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
imp…
-
```console
> daq-proc@8.0.0 build
> rollup --config
./src/index.js → ./dist/daq-proc.umd.js, ./dist/daq-proc.cjs.js, ./dist/daq-proc.esm.mjs...
(!) `this` has been rewritten to `undefined`
ht…
eklem updated
1 month ago
-
### Willing to submit a PR to fix?
- [ ] I am willing to submit a PR to fix
### Requested priority
Normal
### Products/applications affected
_No response_
### Package version(s)
n…