mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-11-30 02:32:58 +05:30
Формат классов в зависимости от env
This commit is contained in:
parent
d2192b6057
commit
dbe933d2a5
@ -8,8 +8,6 @@ var HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
var cssnano = require('cssnano');
|
||||
var iconfontImporter = require('./webpack/node-sass-iconfont-importer');
|
||||
|
||||
const API_HOST = 'http://account.l';
|
||||
|
||||
/**
|
||||
* TODO: https://babeljs.io/docs/plugins/
|
||||
* TODO: отдельные конфиги для env (аля https://github.com/davezuko/react-redux-starter-kit)
|
||||
@ -28,6 +26,9 @@ var isTest = process.argv.some(function(arg) {
|
||||
return arg.indexOf('karma') !== -1;
|
||||
});
|
||||
|
||||
const API_HOST = 'http://account.l';
|
||||
const CSS_CLASS_TEMPLATE = isProduction ? '[hash:base64]' : '[path][name]-[local]';
|
||||
|
||||
var webpackConfig = {
|
||||
entry: {
|
||||
app: path.join(__dirname, 'src'),
|
||||
@ -102,7 +103,7 @@ var webpackConfig = {
|
||||
{
|
||||
test: /\.scss$/,
|
||||
extractInProduction: true,
|
||||
loader: 'style!css?modules&importLoaders=2&localIdentName[=path][name]-[local]!postcss!sass'
|
||||
loader: 'style!css?modules&importLoaders=2&localIdentName=' + CSS_CLASS_TEMPLATE + '!postcss!sass'
|
||||
},
|
||||
{
|
||||
test: /\.jsx?$/,
|
||||
|
Loading…
Reference in New Issue
Block a user