Skip to content

Commit

Permalink
set webpack version to 2.7.0 + remove sass sourcemap support due to b…
Browse files Browse the repository at this point in the history
…reaking mixins (#56)
  • Loading branch information
Donmclean committed Aug 1, 2017
1 parent 1ee9bdb commit a088c73
Show file tree
Hide file tree
Showing 5 changed files with 492 additions and 158 deletions.
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"commander": "^2.9.0",
"copy-webpack-plugin": "^4.0.0",
"cross-spawn": "^5.1.0",
"css-loader": "^0.26.0",
"css-loader": "^0.28.4",
"electron": "^1.6.2",
"electron-packager": "^8.2.0",
"eslint": "3.x",
Expand All @@ -78,16 +78,16 @@
"express": "^4.14.0",
"express-history-api-fallback": "^2.0.0",
"extract-text-webpack-plugin": "^2.1.0",
"file-loader": "^0.10.0",
"file-loader": "^0.11.2",
"flow-bin": "^0.42.0",
"github": "^9.2.0",
"gulp": "^3.9.1",
"gulp-debug": "^3.0.0",
"gulp-eslint": "^3.0.1",
"gulp-load-plugins": "^1.2.4",
"gulp-util": "^3.0.7",
"handlebars-loader": "^1.4.0",
"html-webpack-plugin": "^2.22.0",
"handlebars-loader": "^1.5.0",
"html-webpack-plugin": "^2.30.1",
"immutable": "^3.8.1",
"inquirer": "^3.0.6",
"ip": "^1.1.3",
Expand All @@ -98,23 +98,23 @@
"mocha": "^3.0.2",
"mocha-lcov-reporter": "^1.2.0",
"morgan": "^1.7.0",
"node-sass": "^4.0.0",
"node-sass": "^4.5.3",
"nodemon": "^1.11.0",
"postcss-loader": "^1.0.0",
"pug": "^2.0.0-beta5",
"pug-loader": "^2.2.1",
"q": "^1.4.1",
"q-io": "^1.13.2",
"react-hot-loader": "3.0.0-beta.7",
"sass-loader": "^5.0.1",
"sass-loader": "^6.0.6",
"shelljs": "^0.7.8",
"snyk": "^1.37.0",
"style-loader": "^0.13.1",
"style-loader": "^0.18.2",
"stylus": "^0.54.5",
"stylus-loader": "^2.4.0",
"stylus-loader": "^3.0.1",
"url-loader": "^0.5.7",
"webpack": "2.3.1",
"webpack-dev-server": "^2.3.0",
"webpack": "2.7.0",
"webpack-dev-server": "^2.6.1",
"webpack-merge": "^4.1.0",
"webpack-notifier": "^1.4.1",
"webpack-shell-plugin": "^0.5.0",
Expand Down
8 changes: 5 additions & 3 deletions src/utils/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export const stylesheetProdRules = (type, regex, customConfig, ExtractTextPlugin
test: new RegExp(regex),
use: ExtractTextPlugin.extract({
fallback: "style-loader",
allChunks: true,
use: compact([
{
loader: 'css-loader',
Expand All @@ -92,9 +93,10 @@ export const stylesheetProdRules = (type, regex, customConfig, ExtractTextPlugin
(type !== 'css') ? {
loader: `${type}-loader`,
options: {
sourceMap: !!customConfig.devtool
//TODO: update this asap when support is available => !!customConfig.devtool
sourceMap: (type !== 'sass') ? !!customConfig.devtool : false
}
} : null
} : false

])
})
Expand All @@ -115,7 +117,7 @@ export const stylesheetDevRules = (type, regex, customConfig) => ({
}
}
},
(type !== 'css') ? `${type}-loader${customConfig.devtool ? '?sourceMap' : ''}` : null
(type !== 'css') ? `${type}-loader${customConfig.devtool ? '?sourceMap' : ''}` : false
])
});

Expand Down
2 changes: 1 addition & 1 deletion src/utils/webpackConfigUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export const getDefaultConfigOptions = (env, configMap) => {
loader: "url-loader?mimetype=application/font-woff"
},
{
test: /\.(eot|ttf|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
test: /\.(eot|ttf)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: 'file-loader'
},
//IMAGES
Expand Down
2 changes: 2 additions & 0 deletions src/webpack.config.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import os from 'os';
//CONFIGURATION
const config = new immutable.Map().withMutations((configMap) => {

process.traceDeprecation = true;

configMap.set('context', customConfig.baseDir);

configMap.set('entry', customConfig.entry);
Expand Down
Loading

0 comments on commit a088c73

Please sign in to comment.