NativeScript / nativescript-dev-webpack

A package to help with webpacking NativeScript apps.
Apache License 2.0
97 stars 49 forks source link

Inability to find Worker Loader on Symlinked plugins #1009

Open NathanaelA opened 5 years ago

NathanaelA commented 5 years ago

Environment

Describe the bug I have two plugins, both are symlinked into the plugin folder; NS-Sqlite -> loads NS-Sqlite-Commercial NS-Sqlite-Commercial requires the worker loader for the worker support.

NS-Sqlite-commercial fails on the line

const SqliteWorker = require("nativescript-worker-loader!./commercial-worker.js");

With the error: image

To Reproduce Symlinked Plugin using the nativescript-worker-loader...

Expected behavior Works

Additional context Fix:

        resolveLoader: {
            modules: [
                resolve(__dirname, "node_modules"),
                "node_modules"
            ],
            // don't resolve symlinks to symlinked loaders
            symlinks: false
        },

Change the resolveLoader, modules to also have the same fix as we used for the symlink file issue #983

NathanaelA commented 5 years ago

@DimitarTachev - here is another symlink issue -- I know it is broken on JS; I don't know about any of the other flavors...