rollup / rollup-plugin-node-resolve

This module has moved and is now available at @rollup/plugin-node-resolve / https://github.com/rollup/plugins/blob/master/packages/node-resolve
MIT License
469 stars 96 forks source link

(!) Unresolved dependencies https://rollupjs.org/guide/en#warning-treating-module-as-external-dependency #199

Closed Dylanwooo closed 5 years ago

Dylanwooo commented 5 years ago

I try to import a third party package, but I got this warning: 2019-02-27 4 29 48

I have already used the resolve plugin as the docs suggests but still got this warning

here is my config and is quite simple:

2019-02-27 4 35 10

and this is the file where I import the third party package:

2019-02-27 4 36 22
ultrafez commented 5 years ago

The README states that most packages we import are CommonJS modules, and so the rollup-plugin-commonjs plugin is required (see docs). Does this solve your issue?

dima-takoy-zz commented 5 years ago

No updates here and can't reproduce it because can't install @jmfe/jm-common. I think it can be closed.

cxytomo commented 5 years ago

I encounter the same issue. After I bringing in commonjs and resolve plugins, the problem still exists.

// rollup.config.js import resolve from 'rollup-plugin-node-resolve'; import commonjs from 'rollup-plugin-commonjs';

export default { input: 'src/main.js', output: { file: 'bundle.js', format: 'cjs' }, name: 'fp', plugins: [ resolve(), commonjs() ] };

I import Fingerprint2 as a third party package

cxytomo commented 5 years ago

Problem solved. Make sure the name of wanted package is right.