-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update dependencies to latest version
* Added webpack folder to .eslintignore * Added external section to webpack config * Added verifyOnly parameter to typingsCssModulesLoader
- Loading branch information
Showing
9 changed files
with
43 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,13 @@ | |
* Created by: Andrey Polyakov ([email protected]) | ||
*/ | ||
const {argv} = require('yargs'); | ||
const get = require('lodash/get'); | ||
|
||
module.exports = (api) => { | ||
const {env} = argv; | ||
const mode = env.mode ? env.mode : 'production'; | ||
const mode = argv ? get(argv, 'env.mode', 'production') : 'production'; | ||
// This caches the Babel config by environment. | ||
api.cache.using(() => mode); | ||
|
||
return { | ||
presets: [ | ||
[ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
node_modules | ||
dist | ||
webpack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
import {resolve} from 'path'; | ||
|
||
/** | ||
* Created by: Andrey Polyakov ([email protected]) | ||
*/ | ||
import {resolve} from 'path'; | ||
|
||
import MiniCssExtractPlugin from 'mini-css-extract-plugin'; | ||
|
||
import env from '../env'; | ||
import {isDev, isDevServer, isProd} from '../env'; | ||
import resources from '../resources/sassResources'; | ||
|
||
export const cssLoader = { | ||
loader: 'css-loader', | ||
options: { | ||
sourceMap: env.isProd, | ||
sourceMap: isProd, | ||
}, | ||
}; | ||
|
||
export const cssModulesLoader = { | ||
...cssLoader, | ||
options: { | ||
sourceMap: env.isDev, | ||
sourceMap: isDev, | ||
modules: { | ||
exportLocalsConvention: 'camelCaseOnly', | ||
localIdentName: '[local]__[hash:base64:5]', | ||
|
@@ -49,15 +49,15 @@ export const postCssLoader = { | |
config: { | ||
path: __dirname, | ||
}, | ||
sourceMap: env.isProd, | ||
sourceMap: isProd, | ||
}, | ||
}; | ||
|
||
export const miniCssExtractLoader = env.isProd | ||
export const miniCssExtractLoader = isProd | ||
? { | ||
loader: MiniCssExtractPlugin.loader, | ||
options: { | ||
hmr: env.isDevServer, | ||
hmr: isDevServer, | ||
}, | ||
} | ||
: 'style-loader'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** | ||
* Created by: Andrey Polyakov ([email protected]) | ||
*/ | ||
export default { | ||
// jquery: 'jQuery' | ||
}; |