Skip to content

Commit

Permalink
Stop recommending node-builtins (#4190)
Browse files Browse the repository at this point in the history
* Stop recommending node-builtins. Closes #2881

* Update all occurrences of node-polyfills.
  • Loading branch information
curran committed Jul 25, 2021
1 parent 08655bc commit b1c4a17
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cli/run/batchWarnings.ts
Expand Up @@ -78,7 +78,7 @@ const immediateHandlers: {
stderr(
`Creating a browser bundle that depends on ${printQuotedStringList(
warning.modules!
)}. You might need to include https://github.com/ionic-team/rollup-plugin-node-polyfills`
)}. You might need to include https://github.com/snowpackjs/rollup-plugin-polyfill-node`
);
},

Expand Down
2 changes: 1 addition & 1 deletion docs/08-troubleshooting.md
Expand Up @@ -91,7 +91,7 @@ export default {

If you *do* want to include the module in your bundle, you need to tell Rollup how to find it. In most cases, this is a question of using [@rollup/plugin-node-resolve](https://github.com/rollup/plugins/tree/master/packages/node-resolve).

Some modules, like `events` or `util`, are built in to Node.js. If you want to include those (for example, so that your bundle runs in the browser), you may need to include [rollup-plugin-node-polyfills](https://github.com/ionic-team/rollup-plugin-node-polyfills).
Some modules, like `events` or `util`, are built in to Node.js. If you want to include those (for example, so that your bundle runs in the browser), you may need to include [rollup-plugin-polyfill-node](https://github.com/snowpackjs/rollup-plugin-polyfill-node).

### Error: "EMFILE: too many open files"

Expand Down
2 changes: 1 addition & 1 deletion src/finalisers/shared/warnOnBuiltins.ts
Expand Up @@ -38,7 +38,7 @@ export default function warnOnBuiltins(
code: 'MISSING_NODE_BUILTINS',
message: `Creating a browser bundle that depends on Node.js built-in modules (${printQuotedStringList(
externalBuiltins
)}). You might need to include https://github.com/ionic-team/rollup-plugin-node-polyfills`,
)}). You might need to include https://github.com/snowpackjs/rollup-plugin-polyfill-node`,
modules: externalBuiltins
});
}
2 changes: 1 addition & 1 deletion test/cli/samples/warn-multiple/_config.js
Expand Up @@ -7,7 +7,7 @@ module.exports = {
assertIncludes(
stderr,
'(!) Missing shims for Node.js built-ins\n' +
'Creating a browser bundle that depends on "url", "assert" and "path". You might need to include https://github.com/ionic-team/rollup-plugin-node-polyfills\n'
'Creating a browser bundle that depends on "url", "assert" and "path". You might need to include https://github.com/snowpackjs/rollup-plugin-polyfill-node\n'
);
assertIncludes(
stderr,
Expand Down
2 changes: 1 addition & 1 deletion test/misc/misc.js
Expand Up @@ -49,7 +49,7 @@ describe('misc', () => {
assert.equal(relevantWarnings.length, 1);
assert.equal(
relevantWarnings[0].message,
`Creating a browser bundle that depends on Node.js built-in modules ("util"). You might need to include https://github.com/ionic-team/rollup-plugin-node-polyfills`
`Creating a browser bundle that depends on Node.js built-in modules ("util"). You might need to include https://github.com/snowpackjs/rollup-plugin-polyfill-node`
);
});
});
Expand Down

0 comments on commit b1c4a17

Please sign in to comment.