mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
28 lines
592 B
JavaScript
28 lines
592 B
JavaScript
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
const ScriptExtPlugin = require('script-ext-html-webpack-plugin');
|
|
|
|
const {
|
|
projectRoot,
|
|
buildRoot
|
|
} = require('./helpers');
|
|
|
|
module.exports = (env) => {
|
|
return {
|
|
entry: buildRoot('./main.browser.ts', env),
|
|
output: {
|
|
filename: 'client.js'
|
|
},
|
|
target: 'web',
|
|
plugins: [
|
|
new HtmlWebpackPlugin({
|
|
template: buildRoot('./index.html', env),
|
|
output: projectRoot('dist'),
|
|
inject: 'head'
|
|
}),
|
|
new ScriptExtPlugin({
|
|
defaultAttribute: 'defer'
|
|
})
|
|
]
|
|
};
|
|
}
|