about summary refs log tree commit diff
path: root/config/webpack/configuration.js
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2017-05-21 00:31:47 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-05-20 17:31:47 +0200
commit2e112e240666b62b8c3d4fa201fb24b841f6c92b (patch)
treef95f2eb5ae8156c10bf16894919d0ba5e3f34096 /config/webpack/configuration.js
parent812fe90ecaef58f1dbe16c3fdfea79e14e7bbc9d (diff)
Improve eslint rules (#3147)
* Add semi to ESLint rules

* Add padded-blocks to ESLint rules

* Add comma-dangle to ESLint rules

* add config/webpack and storyboard

* add streaming/

* yarn test:lint -- --fix
Diffstat (limited to 'config/webpack/configuration.js')
-rw-r--r--config/webpack/configuration.js28
1 files changed, 14 insertions, 14 deletions
diff --git a/config/webpack/configuration.js b/config/webpack/configuration.js
index e2f8d2d8b..922e8c517 100644
--- a/config/webpack/configuration.js
+++ b/config/webpack/configuration.js
@@ -1,20 +1,20 @@
 // Common configuration for webpacker loaded from config/webpack/paths.yml
 
-const { join, resolve } = require('path')
-const { env } = require('process')
-const { safeLoad } = require('js-yaml')
-const { readFileSync } = require('fs')
+const { join, resolve } = require('path');
+const { env } = require('process');
+const { safeLoad } = require('js-yaml');
+const { readFileSync } = require('fs');
 
-const configPath = resolve('config', 'webpack')
-const loadersDir = join(__dirname, 'loaders')
-const paths = safeLoad(readFileSync(join(configPath, 'paths.yml'), 'utf8'))[env.NODE_ENV || 'development']
-const devServer = safeLoad(readFileSync(join(configPath, 'development.server.yml'), 'utf8'))[env.NODE_ENV || 'development']
+const configPath = resolve('config', 'webpack');
+const loadersDir = join(__dirname, 'loaders');
+const paths = safeLoad(readFileSync(join(configPath, 'paths.yml'), 'utf8'))[env.NODE_ENV || 'development'];
+const devServer = safeLoad(readFileSync(join(configPath, 'development.server.yml'), 'utf8'))[env.NODE_ENV || 'development'];
 
 // Compute public path based on environment and CDN_HOST in production
-const ifHasCDN = env.CDN_HOST !== undefined && env.NODE_ENV === 'production'
-const devServerUrl = `http://${devServer.host}:${devServer.port}/${paths.entry}/`
-const publicUrl = ifHasCDN ? `${env.CDN_HOST}/${paths.entry}/` : `/${paths.entry}/`
-const publicPath = env.NODE_ENV !== 'production' ? devServerUrl : publicUrl
+const ifHasCDN = env.CDN_HOST !== undefined && env.NODE_ENV === 'production';
+const devServerUrl = `http://${devServer.host}:${devServer.port}/${paths.entry}/`;
+const publicUrl = ifHasCDN ? `${env.CDN_HOST}/${paths.entry}/` : `/${paths.entry}/`;
+const publicPath = env.NODE_ENV !== 'production' ? devServerUrl : publicUrl;
 
 module.exports = {
   devServer,
@@ -22,5 +22,5 @@ module.exports = {
   paths,
   loadersDir,
   publicUrl,
-  publicPath
-}
+  publicPath,
+};