next.js/rspack/lib/index.js
index.js24 lines564 B
process.env.RSPACK_BINDING = require('node:path').dirname(
  require.resolve('@next/rspack-binding')
)

const binding = require('@next/rspack-binding')

// Register the plugin `NextExternalsPlugin` exported by `crates/binding/src/lib.rs`.
binding.registerNextExternalsPlugin()

const core = require('@rspack/core')

const NextExternalsPlugin = core.experiments.createNativePlugin(
  'NextExternalsPlugin',
  function (options) {
    return options
  }
)

Object.defineProperty(core, 'NextExternalsPlugin', {
  value: NextExternalsPlugin,
})

module.exports = core
Quest for Codev2.0.0
/
SIGN IN