-
-
Notifications
You must be signed in to change notification settings - Fork 13
Rollup and external dependencies #21
Comments
Another option may be to resolve the modules directly: https://github.com/rollup/rollup-plugin-node-resolve |
Looking to submit a PR, based on this article I believe we need to define external dependencies in rollup's Official documentation here, this example uses externals as well as the plugins: [resolve({
// pass custom options to the resolve plugin
customResolveOptions: {
moduleDirectory: 'node_modules'
}
})],
// indicate which modules should be treated as external
external: ['lodash'] If anyone know's anymore about this feel free to correct me before I start going down the wrong track. |
Just noting down my progress here, more as a reference for myself than anything else. I was able to build plugins by adding the following to the {
// pass custom options to the resolve plugin
customResolveOptions: {
moduleDirectory: 'node_modules'
}
} I also added I did run into an issue where I was importing
Instead I had to change it to:
This appears to be related to #1267. This builds with the following output:
As you can see rollup is guessing the externals currently (I am not sure why), but based on this issue I think we can read from the EDIT #1169 has more information on |
This reverts commit 5a24bdb.
commented at #22 (comment) |
I've released v0.3.0 :) |
Using
0.2.1
as per #19 and it works brilliantly for rolling up.vue
files.Unfortunately I have now run into an issue where Rollup is trying to package up some external dependencies I am using (
axios
&is-object
).In an ideal world I would just like these to be installed into
node_modules
and the plugin use them from there.#2357 on the official Rollup repo has some discussion surrounding this, it might be useful in helping to make a decision moving forward.
Not really sure what the best option is moving forward?
Cheers.
The text was updated successfully, but these errors were encountered: