mirror of
https://github.com/tenrok/BBob.git
synced 2026-06-20 20:00:33 +03:00
fix: proper module resolution in all cases (Node CJS, Node ESM, bundler)
* Add extensions to all imports * Set module resolution to `bundler` to avoid Node specific behavior * Use `ts2mjs` to rename files to `mjs` * Add extensions to `@bbob/types` imports * Fix `package.json` for proper ESM extension and type separation * More module resolution stuff change (`node16` for everything, `node` for Vue 2 plugin) * Use `ts-jest-resolver` for `js` -> `ts` resolving in Jest * Add changeset * Add import extensions to frontend libs
This commit is contained in:
@@ -14,7 +14,17 @@
|
||||
"types"
|
||||
],
|
||||
"types": "types/index.d.ts",
|
||||
"module": "types/index.d.ts",
|
||||
"module": "types/index.d.mts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./types/index.d.mts"
|
||||
},
|
||||
"require": {
|
||||
"types": "./types/index.d.ts"
|
||||
}
|
||||
}
|
||||
},
|
||||
"homepage": "https://github.com/JiLiZART/bbob",
|
||||
"author": "Nikolay Kostyurin <jilizart@gmail.com>",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ParseOptions } from "./parser";
|
||||
import { NodeContent, PartialNodeContent, TagNodeObject, TagNodeTree } from "./common";
|
||||
import { ParseOptions } from "./parser.js";
|
||||
import { NodeContent, PartialNodeContent, TagNodeObject, TagNodeTree } from "./common.js";
|
||||
|
||||
export interface BBobCoreOptions<
|
||||
Data = unknown | null,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export * from './common'
|
||||
export * from './parser'
|
||||
export * from './core'
|
||||
export * from './preset'
|
||||
export * from './common.js'
|
||||
export * from './parser.js'
|
||||
export * from './core.js'
|
||||
export * from './preset.js'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { TagNodeTree, TagPosition } from "./common";
|
||||
import { TagNodeTree, TagPosition } from "./common.js";
|
||||
|
||||
export interface ParseError {
|
||||
tagName: string;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
import { BBobCoreTagNodeTree, BBobPluginFunction, BBobPluginOptions } from "./core";
|
||||
import { TagNodeObject } from "./common";
|
||||
import { BBobCoreTagNodeTree, BBobPluginFunction, BBobPluginOptions } from "./core.js";
|
||||
import { TagNodeObject } from "./common.js";
|
||||
|
||||
export type PartialRecord<K extends keyof any, T> = Partial<Record<K, T>>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user