mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 18:44:14 +00:00
Added CopyWebpackPlugin to webpack config
This commit is contained in:
@@ -2,6 +2,7 @@ var webpack = require('webpack');
|
|||||||
var path = require('path');
|
var path = require('path');
|
||||||
var clone = require('js.clone');
|
var clone = require('js.clone');
|
||||||
var webpackMerge = require('webpack-merge');
|
var webpackMerge = require('webpack-merge');
|
||||||
|
let CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||||
|
|
||||||
export var commonPlugins = [
|
export var commonPlugins = [
|
||||||
new webpack.ContextReplacementPlugin(
|
new webpack.ContextReplacementPlugin(
|
||||||
@@ -13,6 +14,11 @@ export var commonPlugins = [
|
|||||||
}
|
}
|
||||||
),
|
),
|
||||||
|
|
||||||
|
new CopyWebpackPlugin([{
|
||||||
|
from: path.join(__dirname, 'resources', 'i18n'),
|
||||||
|
to: path.join('assets', 'i18n')
|
||||||
|
}]),
|
||||||
|
|
||||||
// Loader options
|
// Loader options
|
||||||
new webpack.LoaderOptionsPlugin({
|
new webpack.LoaderOptionsPlugin({
|
||||||
|
|
||||||
@@ -24,7 +30,7 @@ export var commonConfig = {
|
|||||||
devtool: 'source-map',
|
devtool: 'source-map',
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['.ts', '.js', '.json'],
|
extensions: ['.ts', '.js', '.json'],
|
||||||
modules: [ root('node_modules') ]
|
modules: [root('node_modules')]
|
||||||
},
|
},
|
||||||
context: __dirname,
|
context: __dirname,
|
||||||
output: {
|
output: {
|
||||||
|
Reference in New Issue
Block a user