From cc7b205f54f9c5c6d1d75a066b0548b0c6612773 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Fri, 2 Jun 2017 16:38:33 +0100 Subject: [PATCH] fix i18n issue with webpack --- demo-shell-ng2/config/webpack.dev.js | 30 +++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/demo-shell-ng2/config/webpack.dev.js b/demo-shell-ng2/config/webpack.dev.js index 1f12afd235..baf0575800 100644 --- a/demo-shell-ng2/config/webpack.dev.js +++ b/demo-shell-ng2/config/webpack.dev.js @@ -4,6 +4,25 @@ const ExtractTextPlugin = require('extract-text-webpack-plugin'); const commonConfig = require('./webpack.common.js'); const helpers = require('./helpers'); const path = require('path'); +const CopyWebpackPlugin = require('copy-webpack-plugin'); + +const alfrescoLibs = [ + 'ng2-activiti-analytics', + 'ng2-activiti-diagrams', + 'ng2-activiti-form', + 'ng2-activiti-processlist', + 'ng2-activiti-tasklist', + 'ng2-alfresco-core', + 'ng2-alfresco-datatable', + 'ng2-alfresco-documentlist', + 'ng2-alfresco-login', + 'ng2-alfresco-search', + 'ng2-alfresco-tag', + 'ng2-alfresco-upload', + 'ng2-alfresco-userinfo', + 'ng2-alfresco-viewer', + 'ng2-alfresco-webscript' +]; module.exports = webpackMerge(commonConfig, { @@ -61,6 +80,15 @@ module.exports = webpackMerge(commonConfig, { htmlLoader: { minimize: false // workaround for ng2 } - }) + }), + new CopyWebpackPlugin([ + ... alfrescoLibs.map(lib => { + return { + context: `../ng2-components/${lib}/src/i18n/`, + from: '**/*', + to: `assets/${lib}/i18n/` + } + }) + ]) ] });