aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/config/webpack.common.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/config/webpack.common.js')
-rw-r--r--client/config/webpack.common.js18
1 files changed, 16 insertions, 2 deletions
diff --git a/client/config/webpack.common.js b/client/config/webpack.common.js
index 9cd33d2ed..f387b44f9 100644
--- a/client/config/webpack.common.js
+++ b/client/config/webpack.common.js
@@ -13,6 +13,7 @@ const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin')
13const ScriptExtHtmlWebpackPlugin = require('script-ext-html-webpack-plugin') 13const ScriptExtHtmlWebpackPlugin = require('script-ext-html-webpack-plugin')
14const InlineManifestWebpackPlugin = require('inline-manifest-webpack-plugin') 14const InlineManifestWebpackPlugin = require('inline-manifest-webpack-plugin')
15const ngcWebpack = require('ngc-webpack') 15const ngcWebpack = require('ngc-webpack')
16const CopyWebpackPlugin = require('copy-webpack-plugin')
16 17
17const WebpackNotifierPlugin = require('webpack-notifier') 18const WebpackNotifierPlugin = require('webpack-notifier')
18 19
@@ -146,14 +147,15 @@ module.exports = function (options) {
146 loader: 'sass-resources-loader', 147 loader: 'sass-resources-loader',
147 options: { 148 options: {
148 resources: [ 149 resources: [
149 helpers.root('src/sass/_variables.scss') 150 helpers.root('src/sass/_variables.scss'),
151 helpers.root('src/sass/_mixins.scss')
150 ] 152 ]
151 } 153 }
152 } 154 }
153 ] 155 ]
154 }, 156 },
155 { test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, use: 'url-loader?limit=10000&minetype=application/font-woff' }, 157 { test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, use: 'url-loader?limit=10000&minetype=application/font-woff' },
156 { test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, use: 'file-loader' }, 158 { test: /\.(otf|ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, use: 'url-loader?limit=10000' },
157 159
158 /* Raw loader support for *.html 160 /* Raw loader support for *.html
159 * Returns file content as string 161 * Returns file content as string
@@ -266,6 +268,17 @@ module.exports = function (options) {
266 inject: 'body' 268 inject: 'body'
267 }), 269 }),
268 270
271 new CopyWebpackPlugin([
272 {
273 from: helpers.root('src/assets/images/favicon.png'),
274 to: 'assets/images/favicon.png'
275 },
276 {
277 from: helpers.root('src/assets/images/default-avatar.png'),
278 to: 'assets/images/default-avatar.png'
279 }
280 ]),
281
269 /* 282 /*
270 * Plugin: ScriptExtHtmlWebpackPlugin 283 * Plugin: ScriptExtHtmlWebpackPlugin
271 * Description: Enhances html-webpack-plugin functionality 284 * Description: Enhances html-webpack-plugin functionality
@@ -289,6 +302,7 @@ module.exports = function (options) {
289 */ 302 */
290 new LoaderOptionsPlugin({ 303 new LoaderOptionsPlugin({
291 options: { 304 options: {
305 context: '',
292 sassLoader: { 306 sassLoader: {
293 precision: 10, 307 precision: 10,
294 includePaths: [ helpers.root('src/sass') ] 308 includePaths: [ helpers.root('src/sass') ]