chore: cleanup imports

This commit is contained in:
Igor Randjelovic
2021-03-11 16:28:11 +01:00
parent da25b30992
commit 0e8336f1d9
13 changed files with 17 additions and 8 deletions

View File

@@ -1,13 +1,13 @@
import Config from 'webpack-chain';
import { resolve } from 'path'
import { additionalCopyRules } from '../../src/helpers/copyRules'
import {
default as angular,
getFileReplacementsFromWorkspaceConfig,
applyFileReplacements
} from '../../src/configuration/angular';
import { init } from '../../src';
import { additionalCopyRules } from '../../src/helpers/copyRules'
import { resolve } from 'path'
jest.mock(
'@ngtools/webpack',

View File

@@ -1,5 +1,6 @@
import Config from 'webpack-chain';
import fs from 'fs';
import base from '../../src/configuration/base';
import { init } from '../../src';

View File

@@ -1,4 +1,5 @@
import Config from 'webpack-chain';
import javascript from '../../src/configuration/javascript';
import { init } from '../../src';

View File

@@ -1,4 +1,5 @@
import Config from 'webpack-chain';
import react from '../../src/configuration/react';
import { init } from '../../src';

View File

@@ -1,4 +1,5 @@
import Config from 'webpack-chain';
import svelte from '../../src/configuration/svelte';
import { init } from '../../src';

View File

@@ -1,4 +1,5 @@
import Config from 'webpack-chain';
import typescript from '../../src/configuration/typescript';
import { init } from '../../src';

View File

@@ -1,4 +1,5 @@
import Config from 'webpack-chain';
import vue from '../../src/configuration/vue';
import { init } from '../../src';

View File

@@ -1,6 +1,7 @@
import xmlNsLoader from '../../src/loaders/xml-namespace-loader';
import dedent from 'ts-dedent';
import xmlNsLoader from '../../src/loaders/xml-namespace-loader';
const CODE_FILE = dedent`
<Page xmlns="http://www.nativescript.org/tns.xsd">
<StackLayout>

View File

@@ -6,6 +6,7 @@ import dedent from 'ts-dedent';
import webpack from 'webpack';
import path from 'path';
import fs from 'fs';
import { parseEnvFlags } from '../cli/parseEnvFlags';
const defaultConfig = path.resolve(

View File

@@ -1,4 +1,4 @@
import { IWebpackEnv } from '@nativescript/webpack';
import type { IWebpackEnv } from '@nativescript/webpack';
const ENV_FLAG_RE = /--env\.(\w+)(?:=(.+))?/;

View File

@@ -1,5 +1,5 @@
import Config from 'webpack-chain';
import { resolve, dirname } from 'path';
import Config from 'webpack-chain';
import { existsSync } from 'fs';
import get from 'lodash.get'

View File

@@ -1,6 +1,7 @@
import { DefinePlugin, HotModuleReplacementPlugin } from 'webpack';
import Config from 'webpack-chain';
import { resolve } from 'path';
import os from 'os';
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
import FilterWarningsPlugin from 'webpack-filter-warnings-plugin';
@@ -22,7 +23,6 @@ import {
getEntryDirPath,
getEntryPath,
} from '../helpers/platform';
import os from 'os';
export default function (config: Config, env: IWebpackEnv = _env): Config {
const entryPath = getEntryPath();

View File

@@ -1,6 +1,7 @@
import { getPackageJson, getProjectRootPath } from './project';
import path from 'path';
import { getPackageJson, getProjectRootPath } from './project';
// todo: memoize
/**
* Utility to get all dependencies from the project package.json.