mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-18 00:10:14 +01:00
parent
2108067aab
commit
8887516c44
2 changed files with 20 additions and 17 deletions
|
|
@ -18,14 +18,14 @@ module.exports = {
|
||||||
},
|
},
|
||||||
|
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['', '.ts', '.js', '.json']
|
extensions: ['.ts', '.js', '.json']
|
||||||
},
|
},
|
||||||
|
|
||||||
module: {
|
module: {
|
||||||
loaders: [
|
rules: [
|
||||||
{
|
{
|
||||||
test: /\.ts$/,
|
test: /\.ts$/,
|
||||||
loader: 'awesome-typescript-loader'
|
loaders: 'awesome-typescript-loader'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -35,4 +35,4 @@ module.exports = {
|
||||||
from: 'src/package.json'
|
from: 'src/package.json'
|
||||||
}])
|
}])
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
const helpers = require('./../helpers');
|
const helpers = require('./../helpers');
|
||||||
const webpack = require('webpack');
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||||
|
|
||||||
const METADATA = {
|
const METADATA = {
|
||||||
baseUrl: './',
|
baseUrl: './',
|
||||||
ENV: 'renderer',
|
ENV: 'renderer'
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -14,17 +14,10 @@ const METADATA = {
|
||||||
module.exports = function (env) {
|
module.exports = function (env) {
|
||||||
METADATA.ENV = env
|
METADATA.ENV = env
|
||||||
? env
|
? env
|
||||||
: METADATA.ENV
|
: METADATA.ENV;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
/*
|
|
||||||
* Static metadata for index.html
|
|
||||||
*
|
|
||||||
* See: (custom attribute)
|
|
||||||
*/
|
|
||||||
metadata: METADATA,
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The plataform target where the aplication is going to run in.
|
* The plataform target where the aplication is going to run in.
|
||||||
* It support target electron-renderer, but is not documented.
|
* It support target electron-renderer, but is not documented.
|
||||||
|
|
@ -46,7 +39,7 @@ module.exports = function (env) {
|
||||||
*
|
*
|
||||||
* See: http://webpack.github.io/docs/configuration.html#output-path
|
* See: http://webpack.github.io/docs/configuration.html#output-path
|
||||||
*/
|
*/
|
||||||
path: helpers.root('build'),
|
path: helpers.root('build')
|
||||||
},
|
},
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -56,12 +49,22 @@ module.exports = function (env) {
|
||||||
* See: https://webpack.github.io/docs/configuration.html#node
|
* See: https://webpack.github.io/docs/configuration.html#node
|
||||||
*/
|
*/
|
||||||
node: {
|
node: {
|
||||||
global: 'window',
|
global: true,
|
||||||
crypto: 'empty',
|
crypto: 'empty',
|
||||||
process: true,
|
process: true,
|
||||||
module: false,
|
module: false,
|
||||||
clearImmediate: false,
|
clearImmediate: false,
|
||||||
setImmediate: false
|
setImmediate: false
|
||||||
}
|
},
|
||||||
|
|
||||||
|
plugins: [
|
||||||
|
new HtmlWebpackPlugin({
|
||||||
|
template: 'src/index.html',
|
||||||
|
title: METADATA.title,
|
||||||
|
chunksSortMode: 'dependency',
|
||||||
|
metadata: METADATA,
|
||||||
|
inject: 'head'
|
||||||
|
})
|
||||||
|
]
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue