From 93cec7cbc6c03b2bd95b1e031e894327bdaa65b4 Mon Sep 17 00:00:00 2001 From: Anike Arni Date: Wed, 28 Dec 2016 17:18:45 -0200 Subject: Use minified files for dependencies and copy them to dist folder with webpack --- web-ui/app/index.html | 6 +++--- web-ui/package.json | 2 +- web-ui/webpack.config.js | 56 +++++++++++++++++++++++++++++++++++++++++------- 3 files changed, 52 insertions(+), 12 deletions(-) diff --git a/web-ui/app/index.html b/web-ui/app/index.html index 65951a54..9449dfb3 100644 --- a/web-ui/app/index.html +++ b/web-ui/app/index.html @@ -94,14 +94,14 @@ - - + + - + diff --git a/web-ui/package.json b/web-ui/package.json index 267841f2..728699e6 100644 --- a/web-ui/package.json +++ b/web-ui/package.json @@ -11,7 +11,7 @@ "babel-preset-es2015": "^6.18.0", "bower": "1.7.9", "dompurify": "^0.8.4", - "flightjs": "^1.5.1", + "flightjs": "1.3.0", "font-awesome": "^4.7.0", "foundation-sites": "^6.3.0", "handlebars": "^4.0.5", diff --git a/web-ui/webpack.config.js b/web-ui/webpack.config.js index 7bacee4a..1ab036c6 100644 --- a/web-ui/webpack.config.js +++ b/web-ui/webpack.config.js @@ -6,8 +6,8 @@ module.exports = { entry: './app/js/index.js', node: { fs: 'empty' }, output: { - path: path.join(__dirname, '/app/js/'), - filename: 'bundle.js', + path: path.join(__dirname, '/app/'), + filename: 'app.min.js', publicPath: '/assets/js/' }, resolve: { @@ -50,19 +50,59 @@ module.exports = { }, plugins: [ new CopyWebpackPlugin([ - { context: 'app/', from: '404.html', to: '../' }, - { context: 'app/', from: 'fonts/*', to: '../' }, - { context: 'app/', from: 'locales/**/*', to: '../' }, - { context: 'app/', from: 'bower_components/font-awesome/fonts/*', to: '../' }, + { context: 'app/', from: '404.html' }, + { context: 'app/', from: 'fonts/*' }, + { context: 'app/', from: 'locales/**/*' }, + { context: 'app/', from: 'bower_components/font-awesome/fonts/*' }, { context: 'app/', from: 'bower_components/font-awesome/css/font-awesome.min.css', - to: '../bower_components/font-awesome/css' + to: 'bower_components/font-awesome/css' }, { context: 'app/', from: 'bower_components/jquery-file-upload/css/jquery.fileupload.css', - to: '../bower_components/jquery-file-upload/css' + to: 'bower_components/jquery-file-upload/css' + }, + { + context: 'app/', + from: 'bower_components/modernizr/modernizr.js', + to: 'bower_components/modernizr' + }, + { + context: 'app/', + from: 'bower_components/lodash/dist/lodash.min.js', + to: 'bower_components/lodash/dist' + }, + { + context: 'app/', + from: 'bower_components/jquery/dist/jquery.min.js', + to: 'bower_components/jquery/dist' + }, + { + context: 'app/', + from: 'bower_components/jquery-ui/jquery-ui.min.js', + to: 'bower_components/jquery-ui' + }, + { + context: 'app/', + from: 'bower_components/jquery-file-upload/js/jquery.fileupload.js', + to: 'bower_components/jquery-file-upload/js' + }, + { + context: 'app/', + from: 'bower_components/handlebars/handlebars.min.js', + to: 'bower_components/handlebars' + }, + { + context: 'app/', + from: 'bower_components/typeahead.js/dist/typeahead.bundle.min.js', + to: 'bower_components/typeahead.js/dist' + }, + { + context: 'app/', + from: 'bower_components/iframe-resizer/js/iframeResizer.min.js', + to: 'bower_components/iframe-resizer/js' } ]) ] -- cgit v1.2.3