Skip to content

Commit 733b7f0

Browse files
refactor: drop schema-utils and loader-utils
1 parent dc68114 commit 733b7f0

File tree

3 files changed

+2
-13
lines changed

3 files changed

+2
-13
lines changed

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@
4444
"dependencies": {
4545
"cosmiconfig": "^7.0.0",
4646
"klona": "^2.0.4",
47-
"loader-utils": "^2.0.0",
48-
"schema-utils": "^3.0.0",
4947
"semver": "^7.3.4"
5048
},
5149
"devDependencies": {

src/index.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import { getOptions } from "loader-utils";
2-
import { validate } from "schema-utils";
3-
41
import postcss from "postcss";
52
import { satisfies } from "semver";
63
import postcssPackage from "postcss/package.json";
@@ -31,15 +28,8 @@ import {
3128
*/
3229

3330
export default async function loader(content, sourceMap, meta) {
34-
const options = getOptions(this);
35-
36-
validate(schema, options, {
37-
name: "PostCSS Loader",
38-
baseDataPath: "options",
39-
});
40-
31+
const options = this.getOptions(schema);
4132
const callback = this.async();
42-
4333
const configOption =
4434
typeof options.postcssOptions === "undefined" ||
4535
typeof options.postcssOptions.config === "undefined"

src/options.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"title": "PostCSS Loader options",
23
"type": "object",
34
"properties": {
45
"postcssOptions": {

0 commit comments

Comments
 (0)