mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-16 23:40:14 +01:00
parent
2108067aab
commit
8887516c44
2 changed files with 20 additions and 17 deletions
|
|
@ -18,14 +18,14 @@ module.exports = {
|
|||
},
|
||||
|
||||
resolve: {
|
||||
extensions: ['', '.ts', '.js', '.json']
|
||||
extensions: ['.ts', '.js', '.json']
|
||||
},
|
||||
|
||||
module: {
|
||||
loaders: [
|
||||
rules: [
|
||||
{
|
||||
test: /\.ts$/,
|
||||
loader: 'awesome-typescript-loader'
|
||||
loaders: 'awesome-typescript-loader'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -35,4 +35,4 @@ module.exports = {
|
|||
from: 'src/package.json'
|
||||
}])
|
||||
]
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
const helpers = require('./../helpers');
|
||||
const webpack = require('webpack');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
|
||||
const METADATA = {
|
||||
baseUrl: './',
|
||||
ENV: 'renderer',
|
||||
ENV: 'renderer'
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -14,17 +14,10 @@ const METADATA = {
|
|||
module.exports = function (env) {
|
||||
METADATA.ENV = env
|
||||
? env
|
||||
: METADATA.ENV
|
||||
: METADATA.ENV;
|
||||
|
||||
return {
|
||||
|
||||
/*
|
||||
* Static metadata for index.html
|
||||
*
|
||||
* See: (custom attribute)
|
||||
*/
|
||||
metadata: METADATA,
|
||||
|
||||
/**
|
||||
* The plataform target where the aplication is going to run in.
|
||||
* 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
|
||||
*/
|
||||
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
|
||||
*/
|
||||
node: {
|
||||
global: 'window',
|
||||
global: true,
|
||||
crypto: 'empty',
|
||||
process: true,
|
||||
module: false,
|
||||
clearImmediate: 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