mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 12:57:42 +08:00
feat: support importHelpers config option
This commit is contained in:
@ -1,8 +1,9 @@
|
||||
import { extname, resolve } from 'path';
|
||||
import { extname, resolve, join } from 'path';
|
||||
import {
|
||||
ContextExclusionPlugin,
|
||||
DefinePlugin,
|
||||
HotModuleReplacementPlugin,
|
||||
NormalModuleReplacementPlugin,
|
||||
} from 'webpack';
|
||||
import Config from 'webpack-chain';
|
||||
import { existsSync } from 'fs';
|
||||
@ -368,6 +369,13 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
|
||||
// }
|
||||
// ])
|
||||
|
||||
config
|
||||
.plugin('NormalModuleReplacementPlugin|tslib')
|
||||
.use(NormalModuleReplacementPlugin, [
|
||||
/^tslib$/,
|
||||
'@nativescript/core/tslib',
|
||||
]);
|
||||
|
||||
config.plugin('PlatformSuffixPlugin').use(PlatformSuffixPlugin, [
|
||||
{
|
||||
platform,
|
||||
|
Reference in New Issue
Block a user