Skip to content

Commit

Permalink
Removing focus-devtools if not DEV is not to true, updating to beta2
Browse files Browse the repository at this point in the history
  • Loading branch information
Hartorn committed Sep 11, 2017
1 parent 5ce4a6b commit bda1aac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webpack-focus",
"version": "1.0.0-beta1",
"version": "1.0.0-beta2",
"description": "Focus webpack config",
"main": "./index.js",
"bin": {
Expand Down Expand Up @@ -47,6 +47,7 @@
"html-webpack-plugin": "2.30.1",
"lodash": "4.17.4",
"node-sass": "4.5.3",
"null-loader": "0.1.1",
"postcss-cssnext": "3.0.2",
"postcss-flexbugs-fixes": "3.2.0",
"postcss-import": "10.0.0",
Expand Down
13 changes: 6 additions & 7 deletions src/config/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,6 @@ const baseConfig = (environnement, definedVariables) => {
config.addPlugin(70, new WatchMissingNodeModulesPlugin(path.join(process.cwd(), 'node_modules')));
config.addPlugin(80, new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/));


// Not working well
// if (!parsedEnv.DEV) {
// config.addPlugin(90, new webpack.IgnorePlugin(/focus-devtools/));
// }

if (parsedEnv.ANALYZE) {
config.addPlugin(100, new BundleAnalyzerPlugin());
}
Expand Down Expand Up @@ -188,9 +182,14 @@ const baseConfig = (environnement, definedVariables) => {
presets: ['babel-preset-focus']
}
}],
exclude: { and: [/node_modules/, { not: [/focus-components/] }] } // FIXME for now, change /focus-*/ to /focus-components/
exclude: { and: [/node_modules/, { not: [/focus-components/, /focus-core/] }] } // FIXME for now, change /focus-*/ to /focus-components/
});

// Ignoring devtools if not DEV
if (!parsedEnv.DEV) {
config.addSimpleLoader(25, /focus-devtools/, 'null-loader');
}

// Loader pour le SASS (Extraction du fichier JS, vers un fichier CSS indépendant, cf plugin)
config.addComplexLoader(30, cssLoaderBuilder(parsedEnv));

Expand Down

0 comments on commit bda1aac

Please sign in to comment.