-
-
Notifications
You must be signed in to change notification settings - Fork 626
Closed
Description
- Rollup Plugin Name: @rollup/plugin-node-resolve
- Rollup Plugin Version: 9.0.0
- Rollup Version: 2.30.0
- Operating System (or Browser): macOS 10.15.7
- Node Version: 10.22.0
- Link to reproduction: https://repl.it/join/xdisrknw-matthewdean2
Expected Behavior
- External modules should not be resolved / re-written, as they are, by definition, external
Actual Behavior
- External modules are re-written with a
/node_modules/path. This prevents the Rollup-bundled library from being imported as a module into another repo, as dependencies will not be local to the original repo, they will be installed as dependencies in the importing repo.
For example this line:
import axios from 'axios'
should remain:
import axios from 'axios'
Instead, it turns into:
import axios from './node_modules/axios/index.js';
Additional Information
Any temporary workarounds to this behavior would be welcome.
Reactions are currently unavailable