raw-loader
Advanced tools
Comparing version 1.0.0 to 2.0.0
@@ -5,2 +5,17 @@ # Change Log | ||
<a name="2.0.0"></a> | ||
# [2.0.0](https://github.com/webpack-contrib/raw-loader/compare/v1.0.0...v2.0.0) (2019-03-18) | ||
### Features | ||
* use ES Module export instead of CommonJS ([#69](https://github.com/webpack-contrib/raw-loader/issues/69)) ([3c7bf2c](https://github.com/webpack-contrib/raw-loader/commit/3c7bf2c)) | ||
### BREAKING CHANGES | ||
* use ES Module export instead of CommonJS ([#69](https://github.com/webpack-contrib/raw-loader/issues/69)) ([3c7bf2c](https://github.com/webpack-contrib/raw-loader/commit/3c7bf2c)) | ||
<a name="1.0.0"></a> | ||
@@ -22,2 +37,2 @@ ## 1.0.0 (2018-12-10) | ||
* minimum require `webpack` version is `4` | ||
* minimum require `nodejs` version is `6.9` | ||
* minimum require `nodejs` version is `6.9` |
{ | ||
"name": "raw-loader", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "A loader for webpack that allows importing files as a String", | ||
@@ -10,3 +10,3 @@ "license": "MIT", | ||
"bugs": "https://github.com/webpack-contrib/raw-loader/issues", | ||
"main": "index.js", | ||
"main": "dist/cjs.js", | ||
"engines": { | ||
@@ -16,17 +16,24 @@ "node": ">= 6.9.0" | ||
"scripts": { | ||
"lint": "eslint --cache 'index.js' test", | ||
"start": "npm run build -- -w", | ||
"prebuild": "npm run clean", | ||
"build": "cross-env NODE_ENV=production babel src -d dist --ignore 'src/**/*.test.js' --copy-files", | ||
"clean": "del-cli dist", | ||
"commitlint": "commitlint --from=master", | ||
"lint": "eslint --cache src test", | ||
"prepublish": "npm run build", | ||
"release": "standard-version", | ||
"security": "npm audit", | ||
"test": "jest", | ||
"test:only": "jest", | ||
"test:watch": "jest --watch", | ||
"test:coverage": "jest --collectCoverageFrom='index.js' --coverage", | ||
"test:coverage": "jest --collectCoverageFrom='src/**/*.js' --coverage", | ||
"pretest": "npm run lint", | ||
"test": "npm run test:only", | ||
"ci:lint": "npm run lint && npm run security", | ||
"ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", | ||
"ci:test": "npm run test -- --runInBand", | ||
"ci:test": "npm run test:only -- --runInBand", | ||
"ci:coverage": "npm run test:coverage -- --runInBand", | ||
"ci:lint:commits": "commitlint --from=origin/master --to=${CIRCLE_SHA1}", | ||
"defaults": "webpack-defaults" | ||
}, | ||
"files": [ | ||
"index.js", | ||
"options.json" | ||
"dist/" | ||
], | ||
@@ -47,7 +54,7 @@ "peerDependencies": { | ||
"@commitlint/config-conventional": "^7.1.2", | ||
"@webpack-contrib/defaults": "^3.1.0", | ||
"@webpack-contrib/eslint-config-webpack": "^3.0.0", | ||
"babel-core": "^7.0.0-bridge.0", | ||
"babel-jest": "^23.6.0", | ||
"babel-jest": "^24.5.0", | ||
"cross-env": "^5.2.0", | ||
"del": "^3.0.0", | ||
"del": "^4.0.0", | ||
"del-cli": "^1.1.0", | ||
@@ -58,10 +65,12 @@ "eslint": "^5.10.0", | ||
"husky": "^1.2.0", | ||
"jest": "^23.6.0", | ||
"jest": "^24.5.0", | ||
"lint-staged": "^8.1.0", | ||
"memory-fs": "^0.4.1", | ||
"prettier": "^1.11.1", | ||
"standard-version": "^4.3.0", | ||
"webpack": "^4.3.0", | ||
"webpack-defaults": "^2.1.1" | ||
"standard-version": "^5.0.2", | ||
"webpack": "^4.3.0" | ||
}, | ||
"keywords": [ | ||
"webpack" | ||
], | ||
"babel": { | ||
@@ -82,3 +91,4 @@ "presets": [ | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
"pre-commit": "lint-staged", | ||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS" | ||
} | ||
@@ -96,3 +106,8 @@ }, | ||
] | ||
}, | ||
"prettier": { | ||
"singleQuote": true, | ||
"trailingComma": "es5", | ||
"arrowParens": "always" | ||
} | ||
} |
@@ -22,6 +22,2 @@ <div align="center"> | ||
## Requirements | ||
This module requires a minimum of Node v6.9.0 and Webpack v4.0.0. | ||
## Getting Started | ||
@@ -51,8 +47,8 @@ | ||
{ | ||
test: /\.txt$/, | ||
use: 'raw-loader' | ||
} | ||
] | ||
} | ||
} | ||
test: /\.txt$/i, | ||
use: 'raw-loader', | ||
}, | ||
], | ||
}, | ||
}; | ||
``` | ||
@@ -70,3 +66,3 @@ | ||
Inline. | ||
### Inline | ||
@@ -77,5 +73,17 @@ ```js | ||
Beware, if you already define loader(s) for extension(s) in `webpack.config.js` you should use: | ||
```js | ||
import css from '!!raw-loader!./file.css'; // Adding `!!` to a request will disable all loaders specified in the configuration | ||
``` | ||
## Contributing | ||
Please take a moment to read our contributing guidelines if you haven't yet done so. | ||
[CONTRIBUTING](./.github/CONTRIBUTING.md) | ||
## License | ||
#### [MIT](./LICENSE) | ||
[MIT](./LICENSE) | ||
@@ -88,3 +96,3 @@ [npm]: https://img.shields.io/npm/v/raw-loader.svg | ||
[deps-url]: https://david-dm.org/webpack-contrib/raw-loader | ||
[tests]: https://img.shields.io/circleci/project/github/webpack-contrib/raw-loader.svg | ||
[tests]: https://img.shields.io/circleci/project/github/webpack-contrib/raw-loader.svg | ||
[tests-url]: https://circleci.com/gh/webpack-contrib/raw-loader | ||
@@ -96,2 +104,2 @@ [cover]: https://codecov.io/gh/webpack-contrib/raw-loader/branch/master/graph/badge.svg | ||
[size]: https://packagephobia.now.sh/badge?p=raw-loader | ||
[size-url]: https://packagephobia.now.sh/result?p=raw-loader | ||
[size-url]: https://packagephobia.now.sh/result?p=raw-loader |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
8434
22
7
21
100
0