@import-meta-env/unplugin
Advanced tools
Comparing version 0.1.6 to 0.1.7
@@ -484,3 +484,3 @@ var __create = Object.create; | ||
// package.json | ||
var version = "0.1.6"; | ||
var version = "0.1.7"; | ||
@@ -638,8 +638,8 @@ // ../shared/constant.ts | ||
// src/webpack/import-meta-plugin.ts | ||
var import_webpack = require("webpack"); | ||
var ImportMetaPlugin = class { | ||
apply(compiler) { | ||
const { dependencies } = require("webpack"); | ||
const parserHandler = (parser) => { | ||
parser.hooks.expression.for("import.meta.env").tap("ImportMetaPlugin", (expr) => { | ||
const dep = new import_webpack.dependencies.ConstDependency(placeholder, expr.range); | ||
const dep = new dependencies.ConstDependency(placeholder, expr.range); | ||
dep.loc = expr.loc; | ||
@@ -646,0 +646,0 @@ parser.state.module.addPresentationalDependency(dep); |
@@ -1,4 +0,4 @@ | ||
import { Compiler } from "webpack"; | ||
import type { Compiler } from "webpack"; | ||
export declare class ImportMetaPlugin { | ||
apply(compiler: Compiler): void; | ||
} |
{ | ||
"name": "@import-meta-env/unplugin", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"description": "Load environment variables into import.meta.env object", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
40572