@chialab/esbuild-plugin-meta-url
Advanced tools
Comparing version 0.12.19 to 0.12.22
import path from 'path'; | ||
import { resolve as defaultResolve, isUrl } from '@chialab/node-resolve'; | ||
import { dependencies } from '@chialab/esbuild-helpers'; | ||
import { setupPluginDependencies } from '@chialab/esbuild-helpers'; | ||
import emitPlugin, { emitFileOrChunk, getBaseUrl, prependImportStatement } from '@chialab/esbuild-plugin-emit'; | ||
@@ -104,7 +104,7 @@ import { pipe, walk, getOffsetFromLocation } from '@chialab/estransform'; | ||
async setup(build) { | ||
await dependencies(getParentBuild(build) || build, plugin, [ | ||
await setupPluginDependencies(getParentBuild(build) || build, plugin, [ | ||
emitPlugin(), | ||
]); | ||
const options = build.initialOptions; | ||
const { sourcesContent } = build.initialOptions; | ||
@@ -124,3 +124,3 @@ build.onLoad({ filter: createFilter(build), namespace: 'file' }, async (args) => { | ||
source: path.basename(args.path), | ||
sourcesContent: options.sourcesContent, | ||
sourcesContent, | ||
}, async ({ magicCode, code, ast }) => { | ||
@@ -127,0 +127,0 @@ /** |
{ | ||
"name": "@chialab/esbuild-plugin-meta-url", | ||
"type": "module", | ||
"version": "0.12.19", | ||
"version": "0.12.22", | ||
"description": "A file loader plugin for esbuild for constructed URLs using import metadata.", | ||
@@ -37,5 +37,5 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@chialab/esbuild-helpers": "^0.12.12", | ||
"@chialab/esbuild-plugin-emit": "^0.12.19", | ||
"@chialab/esbuild-plugin-transform": "^0.12.19", | ||
"@chialab/esbuild-helpers": "^0.12.22", | ||
"@chialab/esbuild-plugin-emit": "^0.12.22", | ||
"@chialab/esbuild-plugin-transform": "^0.12.22", | ||
"@chialab/estransform": "^0.12.11", | ||
@@ -48,3 +48,3 @@ "@chialab/node-resolve": "^0.12.19", | ||
}, | ||
"gitHead": "83a72c39b9461439f29bbcbb0ff019267d1a87ad" | ||
"gitHead": "4f148caa35416d70db6201f1994f55c77a30c256" | ||
} |
10734