Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

style-loader

Package Overview
Dependencies
Maintainers
3
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

style-loader - npm Package Compare versions

Comparing version 3.3.2 to 3.3.3

21

dist/index.js

@@ -11,4 +11,13 @@ "use strict";

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const loaderAPI = () => {};
loaderAPI.pitch = function loader(request) {
// eslint-disable-next-line consistent-return
const loader = function loader(content) {
if (this._compiler && this._compiler.options && this._compiler.options.experiments && this._compiler.options.experiments.css && this._module && this._module.type === "css") {
return content;
}
};
loader.pitch = function pitch(request) {
if (this._compiler && this._compiler.options && this._compiler.options.experiments && this._compiler.options.experiments.css && this._module && this._module.type === "css") {
this.emitWarning(new Error('You can\'t use `experiments.css` (`experiments.futureDefaults` enable built-in CSS support by default) and `style-loader` together, please set `experiments.css` to `false` or set `{ type: "javascript/auto" }` for rules with `style-loader` in your webpack config (now `style-loader` does nothing).'));
return;
}
const options = this.getOptions(_options.default);

@@ -30,2 +39,4 @@ const injectType = options.injectType || "styleTag";

const hmrCode = this.hot ? (0, _utils.getLinkHmrCode)(esModule, this, request) : "";
// eslint-disable-next-line consistent-return
return `

@@ -54,2 +65,4 @@ ${(0, _utils.getImportLinkAPICode)(esModule, this)}

const hmrCode = this.hot ? (0, _utils.getStyleHmrCode)(esModule, this, request, true) : "";
// eslint-disable-next-line consistent-return
return `

@@ -112,2 +125,4 @@ var exported = {};

const hmrCode = this.hot ? (0, _utils.getStyleHmrCode)(esModule, this, request, false) : "";
// eslint-disable-next-line consistent-return
return `

@@ -141,3 +156,3 @@ ${(0, _utils.getImportStyleAPICode)(esModule, this)}

};
var _default = loaderAPI;
var _default = loader;
exports.default = _default;

33

package.json
{
"name": "style-loader",
"version": "3.3.2",
"version": "3.3.3",
"description": "style loader module for webpack",

@@ -31,2 +31,5 @@ "license": "MIT",

"lint": "npm-run-all -l -p \"lint:**\"",
"fix:js": "npm run lint:js -- --fix",
"fix:prettier": "npm run lint:prettier -- --write",
"fix": "npm-run-all -l fix:js fix:prettier",
"test:only": "cross-env NODE_ENV=test jest",

@@ -48,5 +51,5 @@ "test:watch": "npm run test:only -- --watch",

"devDependencies": {
"@babel/cli": "^7.21.0",
"@babel/core": "^7.21.0",
"@babel/preset-env": "^7.20.2",
"@babel/cli": "^7.21.5",
"@babel/core": "^7.21.5",
"@babel/preset-env": "^7.21.5",
"@commitlint/cli": "^16.3.0",

@@ -57,9 +60,9 @@ "@commitlint/config-conventional": "^16.2.4",

"cross-env": "^7.0.3",
"cspell": "^6.27.0",
"css-loader": "^6.7.3",
"cspell": "^6.31.1",
"css-loader": "^6.7.4",
"del": "^6.1.1",
"del-cli": "^4.0.1",
"es-check": "^7.1.0",
"eslint": "^8.35.0",
"eslint-config-prettier": "^8.6.0",
"es-check": "^7.1.1",
"eslint": "^8.39.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",

@@ -72,12 +75,12 @@ "file-loader": "^6.2.0",

"lint-staged": "^12.5.0",
"memfs": "^3.4.13",
"memfs": "^3.5.1",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.4",
"sass": "^1.58.3",
"prettier": "^2.8.8",
"sass": "^1.62.1",
"sass-loader": "^12.4.0",
"semver": "^7.3.8",
"semver": "^7.5.0",
"standard-version": "^9.5.0",
"webpack": "^5.75.0",
"webpack": "^5.83.1",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.11.1"
"webpack-dev-server": "^4.13.3"
},

@@ -84,0 +87,0 @@ "keywords": [

@@ -13,3 +13,3 @@ <div align="center">

[![coverage][cover]][cover-url]
[![chat][chat]][chat-url]
[![discussion][discussion]][discussion-url]
[![size][size]][size-url]

@@ -1257,5 +1257,5 @@

[cover-url]: https://codecov.io/gh/webpack-contrib/style-loader
[chat]: https://badges.gitter.im/webpack/webpack.svg
[chat-url]: https://gitter.im/webpack/webpack
[discussion]: https://img.shields.io/github/discussions/webpack/webpack
[discussion-url]: https://github.com/webpack/webpack/discussions
[size]: https://packagephobia.now.sh/badge?p=style-loader
[size-url]: https://packagephobia.now.sh/result?p=style-loader
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc