diff options
author | Nick Van Doorn <vandoorn.nick@gmail.com> | 2017-07-03 13:53:48 -0700 |
---|---|---|
committer | Nick Van Doorn <vandoorn.nick@gmail.com> | 2017-07-03 13:53:48 -0700 |
commit | fe6d2ced56cb974774a1778af0c82a9504ac984b (patch) | |
tree | 68ce15f25c3f35e2713dc2563f77509bafc7a20f /config | |
parent | 75e23a8d46847c0bc04988ecfc0af07f51598083 (diff) |
Remove css-js-loader & load fonts without postcss
Diffstat (limited to 'config')
-rw-r--r-- | config/webpack.config.js | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js index 905dcec..5d37265 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -9,6 +9,7 @@ const SRC_PATH = joinDir('src') const BUILD_PATH = joinDir('build') const PUBLIC_PATH = joinDir('public') const NODE_PATH = joinDir('node_modules') +const FONT_PATH = joinDir('fonts') const FILE_FORMAT = '[name].[hash:8].[ext]' const isProduction = process.env.NODE_ENV === 'production' @@ -51,13 +52,13 @@ module.exports = { }, { test: /\.css$/, // load css libs without css modules or postcss - include: NODE_PATH, + include: [NODE_PATH, FONT_PATH], use: ExtractTextPlugin.extract({ use: ['css-loader'] }) }, { - test: /\.(css\.js|css)$/, // TODO remove .css.js from regex after migrating + test: /\.css$/, include: SRC_PATH, use: ExtractTextPlugin.extract({ use: [{ @@ -72,19 +73,14 @@ module.exports = { loader: 'postcss-loader', options:{ plugins: () => [ - require('postcss-nesting'), - require('postcss-cssnext'), - require('precss') + require('postcss-import'), + require('postcss-cssnext') ] } }] }) }, { - test: /\.css\.js$/, // TODO remove after migrating to postcss - use: ['css-js-loader'] - }, - { test: /\.(js|jsx)$/, include: SRC_PATH, use: [{ |