Skip to content

Commit

Permalink
refactor: revert back to dist/index.* for bw compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Apr 11, 2023
1 parent 64fa81d commit 98e300f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion examples/utils/index.ts
@@ -1,5 +1,5 @@
import { FancyReporter } from "../../src/reporters";
import { createConsola } from "../../src/index.node";
import { createConsola } from "../../src";
import { randomSentence } from "./sentence";

export function reporterDemo(reporter) {
Expand Down
2 changes: 1 addition & 1 deletion lib/index.node.cjs → lib/index.cjs
@@ -1,4 +1,4 @@
const lib = require("../dist/index.node.cjs");
const lib = require("../dist/index.cjs");

module.exports = lib.consola;

Expand Down
12 changes: 6 additions & 6 deletions package.json
Expand Up @@ -18,19 +18,19 @@
"exports": {
".": {
"node": {
"types": "./dist/index.node.d.ts",
"require": "./lib/index.node.cjs",
"import": "./dist/index.node.mjs"
"types": "./dist/index.d.ts",
"require": "./lib/index.cjs",
"import": "./dist/index.mjs"
},
"default": {
"types": "./dist/index.browser.d.ts",
"import": "./dist/index.browser.mjs"
}
}
},
"main": "./lib/index.node.cjs",
"module": "./dist/index.node.mjs",
"types": "./dist/index.node.d.ts",
"main": "./lib/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist",
"lib"
Expand Down
File renamed without changes.
7 changes: 1 addition & 6 deletions test/consola.test.ts
@@ -1,10 +1,5 @@
import { describe, test, expect } from "vitest";
import {
ConsolaReporter,
LogLevels,
LogObject,
createConsola,
} from "../src/index.node";
import { ConsolaReporter, LogLevels, LogObject, createConsola } from "../src";

describe("consola", () => {
test("can set level", () => {
Expand Down

0 comments on commit 98e300f

Please sign in to comment.