mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-17 16:00:14 +01:00
chore(package): update angular to 2.2.3 (#471)
* chore(package): update angular to 2.2.1 * chore(package): update angular to 2.2.3
This commit is contained in:
parent
49a100d34c
commit
20b1beafd7
4 changed files with 108 additions and 56 deletions
|
|
@ -7,6 +7,7 @@ const helpers = require('./helpers');
|
|||
*/
|
||||
// problem with copy-webpack-plugin
|
||||
const AssetsPlugin = require('assets-webpack-plugin');
|
||||
const NormalModuleReplacementPlugin = require('webpack/lib/NormalModuleReplacementPlugin');
|
||||
const ContextReplacementPlugin = require('webpack/lib/ContextReplacementPlugin');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
const ForkCheckerPlugin = require('awesome-typescript-loader').ForkCheckerPlugin;
|
||||
|
|
@ -75,7 +76,7 @@ module.exports = function (options) {
|
|||
extensions: ['.ts', '.js', '.css', '.scss', '.json'],
|
||||
|
||||
// An array of directory names to be resolved to the current directory
|
||||
modules: [helpers.root('src'), 'node_modules'],
|
||||
modules: [helpers.root('src'), helpers.root('node_modules')],
|
||||
|
||||
},
|
||||
|
||||
|
|
@ -107,10 +108,11 @@ module.exports = function (options) {
|
|||
*/
|
||||
{
|
||||
test: /\.ts$/,
|
||||
loaders: [
|
||||
use: [
|
||||
'@angularclass/hmr-loader?pretty=' + !isProd + '&prod=' + isProd,
|
||||
'awesome-typescript-loader',
|
||||
'angular2-template-loader'
|
||||
'angular2-template-loader',
|
||||
'angular2-router-loader'
|
||||
],
|
||||
exclude: [/\.(spec|e2e)\.ts$/]
|
||||
},
|
||||
|
|
@ -122,7 +124,7 @@ module.exports = function (options) {
|
|||
*/
|
||||
{
|
||||
test: /\.json$/,
|
||||
loader: 'json-loader'
|
||||
use: 'json-loader'
|
||||
},
|
||||
|
||||
/*
|
||||
|
|
@ -133,12 +135,12 @@ module.exports = function (options) {
|
|||
{
|
||||
test: /\.css$/,
|
||||
// loaders: ['to-string-loader', 'css-loader']
|
||||
loaders: ['raw-loader']
|
||||
use: ['raw-loader']
|
||||
},
|
||||
|
||||
{
|
||||
test: /\.scss$/,
|
||||
loaders: ['raw-loader', 'sass-loader']
|
||||
use: ['raw-loader', 'sass-loader']
|
||||
},
|
||||
|
||||
{
|
||||
|
|
@ -150,16 +152,18 @@ module.exports = function (options) {
|
|||
},
|
||||
|
||||
{
|
||||
test: /\.woff(2)?(\?v=.+)?$/, loader: 'url-loader?limit=10000&mimetype=application/font-woff'
|
||||
test: /\.woff(2)?(\?v=.+)?$/,
|
||||
use: 'url-loader?limit=10000&mimetype=application/font-woff'
|
||||
},
|
||||
|
||||
{
|
||||
test: /\.(ttf|eot|svg)(\?v=.+)?$/, loader: 'file-loader'
|
||||
test: /\.(ttf|eot|svg)(\?v=.+)?$/,
|
||||
use: 'file-loader'
|
||||
},
|
||||
|
||||
{
|
||||
test: /bootstrap\/dist\/js\/umd\//,
|
||||
loader: 'imports?jQuery=jquery'
|
||||
use: 'imports-loader?jQuery=jquery'
|
||||
},
|
||||
|
||||
/* Raw loader support for *.html
|
||||
|
|
@ -169,7 +173,7 @@ module.exports = function (options) {
|
|||
*/
|
||||
{
|
||||
test: /\.html$/,
|
||||
loader: 'raw-loader',
|
||||
use: 'raw-loader',
|
||||
exclude: [helpers.root('src/index.html')]
|
||||
},
|
||||
|
||||
|
|
@ -177,11 +181,15 @@ module.exports = function (options) {
|
|||
*/
|
||||
{
|
||||
test: /\.(jpg|png|gif)$/,
|
||||
loader: 'file'
|
||||
use: 'file-loader'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
resolveLoader: {
|
||||
moduleExtensions: ['-loader']
|
||||
},
|
||||
|
||||
/*
|
||||
* Add additional plugins to the compiler.
|
||||
*
|
||||
|
|
@ -225,7 +233,7 @@ module.exports = function (options) {
|
|||
*/
|
||||
new ContextReplacementPlugin(
|
||||
// The (\\|\/) piece accounts for path separators in *nix and Windows
|
||||
/angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/,
|
||||
/angular(\\|\/)core(\\|\/)src(\\|\/)linker/,
|
||||
helpers.root('src') // location of your src
|
||||
),
|
||||
|
||||
|
|
@ -237,12 +245,10 @@ module.exports = function (options) {
|
|||
*
|
||||
* See: https://www.npmjs.com/package/copy-webpack-plugin
|
||||
*/
|
||||
new CopyWebpackPlugin([{
|
||||
from: 'src/assets',
|
||||
to: 'assets'
|
||||
}, {
|
||||
from: 'src/meta'
|
||||
} ]),
|
||||
new CopyWebpackPlugin([
|
||||
{ from: 'src/assets', to: 'assets' },
|
||||
{ from: 'src/meta'}
|
||||
]),
|
||||
|
||||
/*
|
||||
* Plugin: HtmlWebpackPlugin
|
||||
|
|
@ -310,18 +316,40 @@ module.exports = function (options) {
|
|||
"window.jQuery": "jquery",
|
||||
Tether: "tether",
|
||||
"window.Tether": "tether",
|
||||
Tooltip: "exports?Tooltip!bootstrap/js/dist/tooltip",
|
||||
Alert: "exports?Alert!bootstrap/js/dist/alert",
|
||||
Button: "exports?Button!bootstrap/js/dist/button",
|
||||
Carousel: "exports?Carousel!bootstrap/js/dist/carousel",
|
||||
Collapse: "exports?Collapse!bootstrap/js/dist/collapse",
|
||||
Dropdown: "exports?Dropdown!bootstrap/js/dist/dropdown",
|
||||
Modal: "exports?Modal!bootstrap/js/dist/modal",
|
||||
Popover: "exports?Popover!bootstrap/js/dist/popover",
|
||||
Scrollspy: "exports?Scrollspy!bootstrap/js/dist/scrollspy",
|
||||
Tab: "exports?Tab!bootstrap/js/dist/tab",
|
||||
Util: "exports?Util!bootstrap/js/dist/util"
|
||||
})
|
||||
Tooltip: "exports-loader?Tooltip!bootstrap/js/dist/tooltip",
|
||||
Alert: "exports-loader?Alert!bootstrap/js/dist/alert",
|
||||
Button: "exports-loader?Button!bootstrap/js/dist/button",
|
||||
Carousel: "exports-loader?Carousel!bootstrap/js/dist/carousel",
|
||||
Collapse: "exports-loader?Collapse!bootstrap/js/dist/collapse",
|
||||
Dropdown: "exports-loader?Dropdown!bootstrap/js/dist/dropdown",
|
||||
Modal: "exports-loader?Modal!bootstrap/js/dist/modal",
|
||||
Popover: "exports-loader?Popover!bootstrap/js/dist/popover",
|
||||
Scrollspy: "exports-loader?Scrollspy!bootstrap/js/dist/scrollspy",
|
||||
Tab: "exports-loader?Tab!bootstrap/js/dist/tab",
|
||||
Util: "exports-loader?Util!bootstrap/js/dist/util"
|
||||
}),
|
||||
|
||||
// Fix Angular 2
|
||||
new NormalModuleReplacementPlugin(
|
||||
/facade(\\|\/)async/,
|
||||
helpers.root('node_modules/@angular/core/src/facade/async.js')
|
||||
),
|
||||
new NormalModuleReplacementPlugin(
|
||||
/facade(\\|\/)collection/,
|
||||
helpers.root('node_modules/@angular/core/src/facade/collection.js')
|
||||
),
|
||||
new NormalModuleReplacementPlugin(
|
||||
/facade(\\|\/)errors/,
|
||||
helpers.root('node_modules/@angular/core/src/facade/errors.js')
|
||||
),
|
||||
new NormalModuleReplacementPlugin(
|
||||
/facade(\\|\/)lang/,
|
||||
helpers.root('node_modules/@angular/core/src/facade/lang.js')
|
||||
),
|
||||
new NormalModuleReplacementPlugin(
|
||||
/facade(\\|\/)math/,
|
||||
helpers.root('node_modules/@angular/core/src/facade/math.js')
|
||||
)
|
||||
],
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue