Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
target,
addAnalyzer
} = require('cozy-scripts/config/webpack.vars')
const path = require('path')
const production = /:production$/.test(process.env.NODE_ENV)
const hotReload = !!process.env.HOT_RELOAD
const SRC_DIR = path.resolve(__dirname, '../src')
module.exports = {
production: production,
target: target,
hotReload,
addAnalyzer,
SRC_DIR,
enabledFlags: getEnabledFlags()
}
loader: 'imports-loader?css=./cozy-bar.css'
}
]
}
}
const appOnlyConfigs = [
require('cozy-scripts/config/webpack.config.react'),
require('cozy-scripts/config/webpack.config.cozy-ui'),
require('cozy-scripts/config/webpack.config.cozy-ui.react'),
require('cozy-scripts/config/webpack.config.css-modules'),
require('cozy-scripts/config/webpack.config.pictures'),
barConfig
]
const common = mergeAppConfigs(
[
require('cozy-scripts/config/webpack.config.eslint'),
require('cozy-scripts/config/webpack.config.base'),
...(target !== 'services' ? appOnlyConfigs : []),
addAnalyzer ? require('cozy-scripts/config/webpack.config.analyzer') : null,
require('./config/webpack.config.base'),
require('./config/webpack.config.manual-resolves'),
require('./config/webpack.config.plugins'),
require('cozy-scripts/config/webpack.config.manifest'),
hotReload ? require(`./config/webpack.config.hot-reload`) : null
].filter(Boolean)
)
const targetCfg = require(`./config/webpack.target.${target}`)
const withTarget = merge.strategy({