Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
POI_PUBLIC_PATH: JSON.stringify(api.config.publicPath),
POI_COMMAND: JSON.stringify(api.command),
__DEV__: JSON.stringify(api.command !== 'build')
},
api.config.constants
)
])
// Copy ./public/* to out dir
// In non-dev commands since it uses devServerOptions.contentBase instead
if (
api.options.command !== 'dev' &&
fs.existsSync(api.resolveBaseDir('public'))
) {
const CopyPlugin = require('copy-webpack-plugin')
CopyPlugin.__expression = `require('copy-webpack-plugin')`
api.chainWebpack(config => {
config.plugin('copy-public').use(CopyPlugin, [
[
{
from: api.resolveBaseDir('public'),
to: '.',
ignore: ['.DS_Store']
}
]
])
})
}
// Resolve loaders and modules in poi's node_modules folder
const inWorkspaces = __dirname.includes('/poi/packages/poi/')