diff options
| author | bozo.kopic <bozo.kopic@gmail.com> | 2017-08-16 15:11:21 +0200 |
|---|---|---|
| committer | bozo.kopic <bozo.kopic@gmail.com> | 2017-08-16 15:11:21 +0200 |
| commit | 28446d95471e74de364b53c3f24d6182fddac0e0 (patch) | |
| tree | 5cf96e6d26a8e27aef74464c6a0a3b0ab191ffff /webpack.config.js | |
| parent | 1b6052d7e74d90806650ff09153c581e7ae851eb (diff) | |
backend
Diffstat (limited to 'webpack.config.js')
| -rw-r--r-- | webpack.config.js | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/webpack.config.js b/webpack.config.js index a76c0af..097b089 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,6 +1,4 @@ var path = require('path'); -var fs = require('fs'); -var webpack = require('webpack'); module.exports = [ @@ -15,23 +13,13 @@ module.exports = [ module: { rules: [ { - test: /\.js$/, - exclude: /node_modules/, - use: { - loader: 'babel-loader' - } - }, - { test: /\.scss$/, use: ["style-loader", "css-loader", "resolve-url-loader", "sass-loader?sourceMap"] }, - - // TODO isolate fonts only - { test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, use: "url-loader?name=fonts/[hash].[ext]&limit=10000&mimetype=application/font-woff" }, - { test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, use: "url-loader?name=fonts/[hash].[ext]&limit=10000&mimetype=application/font-woff" }, - { test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, use: "url-loader?name=fonts/[hash].[ext]&limit=10000&mimetype=application/octet-stream" }, - { test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, use: "file-loader?name=fonts/[hash].[ext]" }, - { test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, use: "url-loader?name=fonts/[hash].[ext]&limit=10000&mimetype=image/svg+xml" } + { + test: /node_modules.*\.(woff|woff2|ttf|eot|svg)$/, + use: "file-loader?name=fonts/[hash].[ext]" + } ] }, resolve: { |
