beyondjava-example-base-library

3.0.2 • Public • Published

Simple demo showing that npm and Webpack can bundle different versions of the same library. Read the full story at https://www.beyondjava.net/npm-transitive-dependencies.

There are three versions of the library:

Version 1.2.0

function printDeepThoughts() {
    console.log(42);
    return 42;
}

module.exports = printDeepThoughts;

Version 2.1.0

function printDeepThoughts() {
    console.log('21 is only half the truth');
    return 21;
}

module.exports = printDeepThoughts;

Version 3.0.x

class DeepThought {
    printDeepThoughts() {
        console.log('84 is twice the truth');
        return 84;
    }
    
}

module.exports = { DeepThought };

Readme

Keywords

none

Package Sidebar

Install

npm i beyondjava-example-base-library

Weekly Downloads

9

Version

3.0.2

License

Apache-2.0

Unpacked Size

1.33 kB

Total Files

3

Last publish

Collaborators

  • beyondjava