StencilJS的节点Pollyfill

问题描述 投票:0回答:1

我在StencilJS应用程序中有一个第三方lib作为依赖项。这个库使用node附带的oob模块:流,事件等。在阅读了docs,之后,我的理解是,在rollup-plugin-node-polyfills中使用stencil.config.ts将使我能够使用那些通常仅在nodeJS应用中可用的模块。

import { Config } from '@stencil/core';
import nodePolyfills from 'rollup-plugin-node-polyfills';

export const config: Config = {
  namespace: 'mycomponents',
  plugins: [
    nodePolyfills(),
  ]
};

在提到了文档中的配置之后,我仍然出现错误

enter image description here

node.js rollupjs stenciljs
1个回答
0
投票

似乎将节点更新为最新的稳定版本已将其修复。从10开始–> 13

© www.soinside.com 2019 - 2024. All rights reserved.