exports-loader
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -5,2 +5,8 @@ # Changelog | ||
### [1.1.1](https://github.com/webpack-contrib/exports-loader/compare/v1.1.0...v1.1.1) (2020-10-09) | ||
### Chore | ||
* update `schema-utils` | ||
## [1.1.0](https://github.com/webpack-contrib/exports-loader/compare/v1.0.1...v1.1.0) (2020-06-24) | ||
@@ -7,0 +13,0 @@ |
@@ -10,6 +10,6 @@ "use strict"; | ||
var _schemaUtils = require("schema-utils"); | ||
var _sourceMap = require("source-map"); | ||
var _schemaUtils = _interopRequireDefault(require("schema-utils")); | ||
var _options = _interopRequireDefault(require("./options.json")); | ||
@@ -29,3 +29,3 @@ | ||
const options = (0, _loaderUtils.getOptions)(this); | ||
(0, _schemaUtils.default)(_options.default, options, { | ||
(0, _schemaUtils.validate)(_options.default, options, { | ||
name: 'Exports Loader', | ||
@@ -32,0 +32,0 @@ baseDataPath: 'options' |
{ | ||
"name": "exports-loader", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "exports loader module for webpack", | ||
@@ -44,3 +44,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"schema-utils": "^2.7.0", | ||
"schema-utils": "^3.0.0", | ||
"loader-utils": "^2.0.0", | ||
@@ -50,25 +50,25 @@ "source-map": "^0.6.1" | ||
"devDependencies": { | ||
"@babel/cli": "^7.10.3", | ||
"@babel/core": "^7.10.3", | ||
"@babel/preset-env": "^7.10.3", | ||
"@commitlint/cli": "^9.0.1", | ||
"@commitlint/config-conventional": "^9.0.1", | ||
"@babel/cli": "^7.11.6", | ||
"@babel/core": "^7.11.6", | ||
"@babel/preset-env": "^7.11.5", | ||
"@commitlint/cli": "^11.0.0", | ||
"@commitlint/config-conventional": "^11.0.0", | ||
"@webpack-contrib/defaults": "^6.3.0", | ||
"@webpack-contrib/eslint-config-webpack": "^3.0.0", | ||
"babel-jest": "^26.1.0", | ||
"babel-jest": "^26.5.2", | ||
"babel-loader": "^8.1.0", | ||
"cross-env": "^7.0.2", | ||
"del": "^5.1.0", | ||
"del": "^6.0.0", | ||
"del-cli": "^3.0.1", | ||
"eslint": "^7.3.1", | ||
"eslint-config-prettier": "^6.11.0", | ||
"eslint-plugin-import": "^2.21.2", | ||
"husky": "^4.2.5", | ||
"jest": "^26.1.0", | ||
"lint-staged": "^10.2.11", | ||
"eslint": "^7.10.0", | ||
"eslint-config-prettier": "^6.12.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"husky": "^4.3.0", | ||
"jest": "^26.5.2", | ||
"lint-staged": "^10.4.0", | ||
"memfs": "^3.2.0", | ||
"npm-run-all": "^4.1.5", | ||
"prettier": "^2.0.5", | ||
"standard-version": "^8.0.0", | ||
"webpack": "^4.43.0" | ||
"prettier": "^2.1.2", | ||
"standard-version": "^9.0.0", | ||
"webpack": "^4.44.2" | ||
}, | ||
@@ -75,0 +75,0 @@ "keywords": [ |
@@ -37,4 +37,9 @@ <div align="center"> | ||
Then add the loader to the desired `import` statemtnt and `require` calls. For example: | ||
The `|` or `%20` (space) allow to separate the `syntax`, `name` and `alias` of export. | ||
The documentation and syntax examples can be read [here](#syntax). | ||
> ⚠ `%20` is space in a query string, because you can't use spaces in URLs | ||
Then add the loader to the desired `import` statement or `require` calls. For example: | ||
```js | ||
@@ -44,2 +49,6 @@ import { myFunction } from 'exports-loader?exports=myFunction!./file.js'; | ||
// | ||
// ... | ||
// Code | ||
// ... | ||
// | ||
// export { myFunction } | ||
@@ -57,2 +66,6 @@ | ||
// | ||
// ... | ||
// Code | ||
// ... | ||
// | ||
// export { myVariable, myFunction }; | ||
@@ -71,2 +84,6 @@ | ||
// | ||
// ... | ||
// Code | ||
// ... | ||
// | ||
// export { file }; | ||
@@ -83,2 +100,6 @@ | ||
// | ||
// ... | ||
// Code | ||
// ... | ||
// | ||
// module.exports = { myFunction } | ||
@@ -89,6 +110,2 @@ | ||
The `|` or `%20` (space) allow to separate the [`syntax`](#syntax), [`name`](#name) and [`alias`](#alias) of export. | ||
> ⚠ `%20` is space in a query string, because you can't use spaces in URLs | ||
```js | ||
@@ -101,2 +118,6 @@ // Alternative syntax: | ||
// | ||
// ... | ||
// Code | ||
// ... | ||
// | ||
// exports default myFunction; | ||
@@ -112,2 +133,6 @@ | ||
// | ||
// ... | ||
// Code | ||
// ... | ||
// | ||
// module.exports = myFunction; | ||
@@ -123,2 +148,6 @@ | ||
// | ||
// ... | ||
// Code | ||
// ... | ||
// | ||
// exports { myFunction as myFunctionAlias }; | ||
@@ -246,6 +275,4 @@ | ||
The `" "` or `|` (space) separate command parts. | ||
The `|` or `%20` (space) allow to separate the `syntax`, `name` and `alias` of export. | ||
String values let you specify export syntax, name and alias. | ||
String syntax - `[[syntax] [name] [alias]]` or `[[syntax]|[name]|[alias]]`, where: | ||
@@ -252,0 +279,0 @@ |
27276
698
- Removedschema-utils@2.7.1(transitive)
Updatedschema-utils@^3.0.0