Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(alias): Fix reference to plugin-node-resolve #175

Merged
merged 2 commits into from
Jan 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/alias/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ This would replace the file extension for all imports ending with `.js` to `.ali

## Resolving algorithm

This plugin uses resolver plugins specified for Rollup and eventually Rollup default algorithm. If you rely on Node specific features, you probably want [rollup-plugin-node-resolve](https://www.npmjs.com/package/rollup-plugin-node-resolve) in your setup.
This plugin uses resolver plugins specified for Rollup and eventually Rollup default algorithm. If you rely on Node specific features, you probably want [@rollup/plugin-node-resolve](https://www.npmjs.com/package/@rollup/plugin-node-resolve) in your setup.

## Custom Resolvers

Expand All @@ -140,7 +140,7 @@ Example:
```javascript
// rollup.config.js
import alias from '@rollup/plugin-alias';
import resolve from 'rollup-plugin-node-resolve';
import resolve from '@rollup/plugin-node-resolve';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found that the code sample was using the old reference as well. I confirmed that the package.json is using the new npm package

"devDependencies": {
"@rollup/plugin-node-resolve": "^7.0.0",
"del-cli": "^3.0.0",
"rollup": "^1.27.14"
},

And the new @rollup/plugin-node-resolve supports the same extensions property


const customResolver = resolve({
extensions: ['.mjs', '.js', '.jsx', '.json', '.sass', '.scss']
Expand Down