enrecipes/webpack.config.js

21 lines
586 B
JavaScript
Raw Normal View History

2021-04-14 09:45:18 +00:00
const webpack = require('@nativescript/webpack')
2021-05-25 14:32:53 +00:00
const path = require('path')
2020-09-15 11:10:16 +00:00
2021-03-23 06:16:25 +00:00
module.exports = (env) => {
2021-04-14 09:45:18 +00:00
webpack.init(env)
2021-05-25 14:32:53 +00:00
const platform = webpack.Utils.platform.getPlatformName()
webpack.chainWebpack((config) => {
if (platform === 'android') {
const appComponents = [
'@nativescript/core/ui/frame',
'@nativescript/core/ui/frame/activity',
path.resolve(__dirname, 'app/ForegroundService.js'),
]
appComponents.map((component) => {
config.entry('bundle').add(component)
})
}
})
2021-04-14 09:45:18 +00:00
return webpack.resolveConfig()
}