mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
25 lines
624 B
JavaScript
25 lines
624 B
JavaScript
const webpack = require('@nativescript/webpack');
|
|
const { resolve } = require('path');
|
|
|
|
module.exports = (env) => {
|
|
webpack.init(env);
|
|
webpack.useConfig('typescript');
|
|
|
|
webpack.chainWebpack((config) => {
|
|
// shared demo code
|
|
config.resolve.alias.set(
|
|
'@demo/shared',
|
|
resolve(__dirname, '..', '..', 'tools', 'demo')
|
|
);
|
|
});
|
|
|
|
// Example if you need to share images across demo apps:
|
|
// webpack.Utils.addCopyRule({
|
|
// from: '../../../tools/images',
|
|
// to: 'images',
|
|
// context: webpack.Utils.project.getProjectFilePath('node_modules')
|
|
// });
|
|
|
|
return webpack.resolveConfig();
|
|
};
|