Sha256: f5191a0d7a372691acca1578db488f34771a2a8cb00beb73beaa11ec9acf3594
Contents?: true
Size: 756 Bytes
Versions: 14
Compression:
Stored size: 756 Bytes
Contents
const fs = require('fs') const { resolve } = require('path') const { setShakapackerEnvVariablesForBackwardCompatibility } = require('./helpers') setShakapackerEnvVariablesForBackwardCompatibility() // For backward compatibility const resolveToPhysicalFilePath = () => { const shakapackerConfigPath = resolve('config', 'shakapacker.yml') const webpackerConfigPath = resolve('config', 'webpacker.yml') if (fs.existsSync(shakapackerConfigPath)) return shakapackerConfigPath if (fs.existsSync(webpackerConfigPath)) return webpackerConfigPath // If neither of files exist, try to resolve to shakapacker.yml to get more relevant error return shakapackerConfigPath } module.exports = process.env.SHAKAPACKER_CONFIG || resolveToPhysicalFilePath()
Version data entries
14 entries across 14 versions & 1 rubygems