FlorianRappl / parcel-plugin-externals

Parcel plugin for declaring externals. These externals will not be bundled. :package:
https://piral.io
MIT License
47 stars 3 forks source link

Parcel v2 #5

Open maximal opened 5 years ago

maximal commented 5 years ago

Is this plugin compatible with Parcel v2 beta?

I tried every combination of:

{
    "peerDependencies": {
        "jquery": "*",
        "jquery.js": "*",
        "bootstrap": "*"
    },
    "externals": [
        "jquery => jQuery",
        "jQuery => jquery",
        "jquery => require('jquery')",
        "jQuery => require('jquery')",
        "jQuery => require('node_modules/jquery/dist/jquery.js')",
        "jquery => require('node_modules/jquery/dist/jquery.js')",
        "$ => require('node_modules/jquery/dist/jquery.js')"
    ],
}

Importing like that:

import $ from 'jquery';

But jQuery is bundled into my app.js whatsoever :-(

FlorianRappl commented 5 years ago

No only Parcel v1. I haven't looked into Parcel v2 - I will / would soon.

Since Parcel v1 / v2 could / will be totally different from the API I suspect another plugin would be needed (different name, different code).

Do you have more infos?

maximal commented 5 years ago

Not yet, sorry. Just trying to move one project from Parcel v1 to Parcel v2.

All I know is these two issues:

FlorianRappl commented 5 years ago

Yes, so I solved / try to solve parcel-bundler/parcel#144, the parcel-bundler/parcel#3305 has not been touched yet.

I suppose they would want either a core functionality that covers this or an "internal" plugin. No idea though :)