Optimize imports
This commit is contained in:
parent
bfb3a98fac
commit
3523b64a03
|
@ -5,7 +5,6 @@ const helpers = require('./helpers')
|
|||
*/
|
||||
|
||||
const AssetsPlugin = require('assets-webpack-plugin')
|
||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
|
||||
const ContextReplacementPlugin = require('webpack/lib/ContextReplacementPlugin')
|
||||
const CommonsChunkPlugin = require('webpack/lib/optimize/CommonsChunkPlugin')
|
||||
const CheckerPlugin = require('awesome-typescript-loader').CheckerPlugin
|
||||
|
@ -297,30 +296,6 @@ module.exports = function (options) {
|
|||
new ngcWebpack.NgcWebpackPlugin({
|
||||
disabled: !AOT,
|
||||
tsConfig: helpers.root('tsconfig.webpack.json')
|
||||
}),
|
||||
|
||||
new BundleAnalyzerPlugin({
|
||||
// Can be `server`, `static` or `disabled`.
|
||||
// In `server` mode analyzer will start HTTP server to show bundle report.
|
||||
// In `static` mode single HTML file with bundle report will be generated.
|
||||
// In `disabled` mode you can use this plugin to just generate Webpack Stats JSON file by setting `generateStatsFile` to `true`.
|
||||
analyzerMode: 'static',
|
||||
// Path to bundle report file that will be generated in `static` mode.
|
||||
// Relative to bundles output directory.
|
||||
reportFilename: 'report.html',
|
||||
// Automatically open report in default browser
|
||||
openAnalyzer: false,
|
||||
// If `true`, Webpack Stats JSON file will be generated in bundles output directory
|
||||
generateStatsFile: true,
|
||||
// Name of Webpack Stats JSON file that will be generated if `generateStatsFile` is `true`.
|
||||
// Relative to bundles output directory.
|
||||
statsFilename: 'stats.json',
|
||||
// Options for `stats.toJson()` method.
|
||||
// For example you can exclude sources of your modules from stats file with `source: false` option.
|
||||
// See more options here: https://github.com/webpack/webpack/blob/webpack-1/lib/Stats.js#L21
|
||||
statsOptions: null,
|
||||
// Log level. Can be 'info', 'warn', 'error' or 'silent'.
|
||||
logLevel: 'info'
|
||||
})
|
||||
],
|
||||
|
||||
|
|
|
@ -91,28 +91,6 @@ module.exports = function (env) {
|
|||
libraryTarget: 'var'
|
||||
},
|
||||
|
||||
module: {
|
||||
|
||||
// Too slow, life is short
|
||||
// rules: [
|
||||
// {
|
||||
// test: /\.ts$/,
|
||||
// use: [
|
||||
// {
|
||||
// loader: 'tslint-loader',
|
||||
// options: {
|
||||
// configFile: 'tslint.json'
|
||||
// }
|
||||
// }
|
||||
// ],
|
||||
// exclude: [
|
||||
// /\.(spec|e2e)\.ts$/,
|
||||
// /node_modules\//
|
||||
// ]
|
||||
// }
|
||||
// ]
|
||||
},
|
||||
|
||||
plugins: [
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,6 +11,7 @@ const videoEmbedConfig = require('./webpack.video-embed.js')
|
|||
* Webpack Plugins
|
||||
*/
|
||||
const DefinePlugin = require('webpack/lib/DefinePlugin')
|
||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
|
||||
const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin')
|
||||
const NormalModuleReplacementPlugin = require('webpack/lib/NormalModuleReplacementPlugin')
|
||||
const OptimizeJsPlugin = require('optimize-js-plugin')
|
||||
|
@ -249,6 +250,30 @@ module.exports = function (env) {
|
|||
path: helpers.root('dist')
|
||||
}
|
||||
}
|
||||
}),
|
||||
|
||||
new BundleAnalyzerPlugin({
|
||||
// Can be `server`, `static` or `disabled`.
|
||||
// In `server` mode analyzer will start HTTP server to show bundle report.
|
||||
// In `static` mode single HTML file with bundle report will be generated.
|
||||
// In `disabled` mode you can use this plugin to just generate Webpack Stats JSON file by setting `generateStatsFile` to `true`.
|
||||
analyzerMode: 'static',
|
||||
// Path to bundle report file that will be generated in `static` mode.
|
||||
// Relative to bundles output directory.
|
||||
reportFilename: 'report.html',
|
||||
// Automatically open report in default browser
|
||||
openAnalyzer: false,
|
||||
// If `true`, Webpack Stats JSON file will be generated in bundles output directory
|
||||
generateStatsFile: true,
|
||||
// Name of Webpack Stats JSON file that will be generated if `generateStatsFile` is `true`.
|
||||
// Relative to bundles output directory.
|
||||
statsFilename: 'stats.json',
|
||||
// Options for `stats.toJson()` method.
|
||||
// For example you can exclude sources of your modules from stats file with `source: false` option.
|
||||
// See more options here: https://github.com/webpack/webpack/blob/webpack-1/lib/Stats.js#L21
|
||||
statsOptions: null,
|
||||
// Log level. Can be 'info', 'warn', 'error' or 'silent'.
|
||||
logLevel: 'info'
|
||||
})
|
||||
],
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import { Observable } from 'rxjs/Observable'
|
|||
import 'rxjs/add/operator/catch'
|
||||
import 'rxjs/add/operator/map'
|
||||
|
||||
import { SortMeta } from 'primeng/primeng'
|
||||
import { SortMeta } from 'primeng/components/common/sortmeta'
|
||||
import { BytesPipe } from 'angular-pipes/src/math/bytes.pipe'
|
||||
|
||||
import { RestExtractor, User, RestPagination, RestService } from '../../../shared'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Component, OnInit } from '@angular/core'
|
||||
import { SortMeta } from 'primeng/primeng'
|
||||
import { SortMeta } from 'primeng/components/common/sortmeta'
|
||||
|
||||
import { NotificationsService } from 'angular2-notifications'
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Component, OnInit } from '@angular/core'
|
||||
|
||||
import { NotificationsService } from 'angular2-notifications'
|
||||
import { SortMeta } from 'primeng/primeng'
|
||||
import { SortMeta } from 'primeng/components/common/sortmeta'
|
||||
|
||||
import { RestTable, RestPagination, VideoAbuseService } from '../../../shared'
|
||||
import { VideoAbuse } from '../../../../../../shared'
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { LazyLoadEvent, SortMeta } from 'primeng/primeng'
|
||||
import { LazyLoadEvent } from 'primeng/components/common/lazyloadevent'
|
||||
import { SortMeta } from 'primeng/components/common/sortmeta'
|
||||
|
||||
import { RestPagination } from './rest-pagination'
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Injectable } from '@angular/core'
|
||||
import { HttpParams } from '@angular/common/http'
|
||||
import { SortMeta } from 'primeng/primeng'
|
||||
import { SortMeta } from 'primeng/components/common/sortmeta'
|
||||
|
||||
import { RestPagination } from './rest-pagination'
|
||||
|
||||
|
|
|
@ -10,7 +10,8 @@ import { BsDropdownModule } from 'ngx-bootstrap/dropdown'
|
|||
import { ProgressbarModule } from 'ngx-bootstrap/progressbar'
|
||||
import { PaginationModule } from 'ngx-bootstrap/pagination'
|
||||
import { ModalModule } from 'ngx-bootstrap/modal'
|
||||
import { DataTableModule, SharedModule as PrimeSharedModule } from 'primeng/primeng'
|
||||
import { DataTableModule } from 'primeng/components/datatable/datatable'
|
||||
import { SharedModule as PrimeSharedModule } from 'primeng/components/common/shared'
|
||||
|
||||
import { AUTH_INTERCEPTOR_PROVIDER } from './auth'
|
||||
import { RestExtractor, RestService } from './rest'
|
||||
|
|
|
@ -4,7 +4,7 @@ import 'rxjs/add/operator/catch'
|
|||
import 'rxjs/add/operator/map'
|
||||
import { Observable } from 'rxjs/Observable'
|
||||
|
||||
import { SortMeta } from 'primeng/primeng'
|
||||
import { SortMeta } from 'primeng/components/common/sortmeta'
|
||||
|
||||
import { AuthService } from '../core'
|
||||
import { RestExtractor, RestPagination, RestService } from '../rest'
|
||||
|
|
Loading…
Reference in New Issue