enrecipes/webpack.config.js

21 lines
595 B
JavaScript
Raw Permalink 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',
2021-06-18 16:22:24 +00:00
path.resolve(__dirname, 'app/services/ForegroundService.js'),
2021-05-25 14:32:53 +00:00
]
appComponents.map((component) => {
config.entry('bundle').add(component)
})
}
})
2021-04-14 09:45:18 +00:00
return webpack.resolveConfig()
}