rollup/rollup-plugin-node-resolve

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

Dylanwooo opened this issue · 4 comments

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

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?

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

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

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