mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-26 11:33:54 +03:00
21 lines
624 B
JavaScript
Executable File
21 lines
624 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
const {existsSync} = require(`fs`);
|
|
const {createRequire, createRequireFromPath} = require(`module`);
|
|
const {resolve} = require(`path`);
|
|
|
|
const relPnpApiPath = "../../../.pnp.cjs";
|
|
|
|
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
|
|
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
|
|
|
|
if (existsSync(absPnpApiPath)) {
|
|
if (!process.versions.pnp) {
|
|
// Setup the environment to be able to require prettier/index.js
|
|
require(absPnpApiPath).setup();
|
|
}
|
|
}
|
|
|
|
// Defer to the real prettier/index.js your application uses
|
|
module.exports = absRequire(`prettier/index.js`);
|