Skip to content

Commit

Permalink
feat: compatible with rspack
Browse files Browse the repository at this point in the history
  • Loading branch information
ahabhgk committed Oct 11, 2023
1 parent 97a864d commit f32653e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import dotenv from 'dotenv-defaults'
import fs from 'fs'
import { DefinePlugin } from 'webpack'

// Mostly taken from here: https://github.com/motdotla/dotenv-expand/blob/master/lib/main.js#L4
const interpolate = (env, vars) => {
Expand Down Expand Up @@ -47,7 +46,7 @@ class Dotenv {
version
})

new DefinePlugin(data).apply(compiler)
new compiler.webpack.DefinePlugin(data).apply(compiler)
}

gatherVariables () {
Expand Down

0 comments on commit f32653e

Please sign in to comment.