https://github.com/csbun/webpack-npm-multi-version-example
test webpack with multi version npm packages
https://github.com/csbun/webpack-npm-multi-version-example
Last synced: 2 months ago
JSON representation
test webpack with multi version npm packages
- Host: GitHub
- URL: https://github.com/csbun/webpack-npm-multi-version-example
- Owner: csbun
- License: mit
- Created: 2017-07-18T04:04:29.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-18T06:05:48.000Z (almost 9 years ago)
- Last Synced: 2025-02-25T08:53:14.339Z (over 1 year ago)
- Language: JavaScript
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# webpack-npm-multi-version-example
test webpack with multi version npm packages
dependencies in this example:
```
example
├── webpack-npm-multi-version-pkg-a@^1.0.0
├── webpack-npm-multi-version-pkg-b@^2.0.0
└─┬ webpack-npm-multi-version-pkg-c@^2.0.0
├── webpack-npm-multi-version-pkg-a@^2.1.0
└── webpack-npm-multi-version-pkg-b@^2.1.0
```
npm@3 install as:
```
node_modules
├── webpack-npm-multi-version-pkg-a@1.2.0
├── webpack-npm-multi-version-pkg-b@2.1.0
└─┬ webpack-npm-multi-version-pkg-c@2.1.3
└── webpack-npm-multi-version-pkg-a@2.1.0
```
test result:
```js
const pkgA = require('webpack-npm-multi-version-pkg-a');
const pkgB = require('webpack-npm-multi-version-pkg-b');
const pkgC = require('webpack-npm-multi-version-pkg-c');
console.log('example; require a@^1.0.0 b@^2.0.0 c@^2.0.0');
pkgA(); // a@1.2.0
pkgB(); // b@2.1.0
console.log('==================');
pkgC(); // c@2.1.3 with a@2.1.0 and b@2.1.0
```