Skip to content

Commit

Permalink
fix(PostCSS): Properly configure webpack to use postcss
Browse files Browse the repository at this point in the history
  • Loading branch information
jourdain committed Jun 30, 2016
1 parent 1a5906a commit 536ac4b
Showing 1 changed file with 24 additions and 21 deletions.
45 changes: 24 additions & 21 deletions webpack.config.js
@@ -1,15 +1,15 @@
var path = require('path'),
webpack = require('webpack'),
loaders = require('./node_modules/paraviewweb/config/webpack.loaders.js'),
plugins = [];
var path = require('path');
var webpack = require('webpack');
var loaders = require('./node_modules/paraviewweb/config/webpack.loaders.js');
var plugins = [];

if(process.env.NODE_ENV === 'production') {
console.log('==> Production build');
plugins.push(new webpack.DefinePlugin({
"process.env": {
NODE_ENV: JSON.stringify("production"),
},
}));
console.log('==> Production build');
plugins.push(new webpack.DefinePlugin({
"process.env": {
NODE_ENV: JSON.stringify("production"),
},
}));
}

module.exports = {
Expand All @@ -20,23 +20,26 @@ module.exports = {
filename: 'LightViz.js',
},
module: {
preLoaders: [{
test: /\.js$/,
loader: "eslint-loader",
exclude: /node_modules/,
}],
preLoaders: [{
test: /\.js$/,
loader: 'eslint-loader',
exclude: /node_modules/,
}],
loaders: [
{ test: require.resolve("./lib/app.js"), loader: "expose?LightViz" },
{ test: require.resolve('./lib/app.js'), loader: 'expose?LightViz' },
].concat(loaders),
},
resolve: {
alias: {
PVWStyle: path.resolve('./node_modules/paraviewweb/style'),
LightVizStyle: path.resolve('./style'),
},
alias: {
PVWStyle: path.resolve('./node_modules/paraviewweb/style'),
LightVizStyle: path.resolve('./style'),
},
},
postcss: [
require('autoprefixer')({ browsers: ['last 2 versions'] }),
],
eslint: {
configFile: '.eslintrc.js',
configFile: '.eslintrc.js',
},
externals: {
},
Expand Down

0 comments on commit 536ac4b

Please sign in to comment.