From cba476edfe05e07367ba4bde02f71da1194f2110 Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Tue, 8 Nov 2016 17:49:48 -0300 Subject: [PATCH] removing watch adding webpack const for env vars --- client/coral-admin/package.json | 1 - client/coral-admin/webpack.config.dev.js | 41 ------------------------ client/coral-admin/webpack.config.js | 1 + 3 files changed, 1 insertion(+), 42 deletions(-) delete mode 100644 client/coral-admin/webpack.config.dev.js diff --git a/client/coral-admin/package.json b/client/coral-admin/package.json index f19191581..190e6830b 100644 --- a/client/coral-admin/package.json +++ b/client/coral-admin/package.json @@ -5,7 +5,6 @@ "main": "index.js", "scripts": { "build": "./node_modules/.bin/webpack --config webpack.config.js", - "watch": "./node_modules/.bin/webpack --config webpack.config.dev.js --watch", "start": "./node_modules/.bin/webpack-dev-server --config webpack.config.dev.js --inline --hot --content-base public --port 3142" }, "keywords": [], diff --git a/client/coral-admin/webpack.config.dev.js b/client/coral-admin/webpack.config.dev.js deleted file mode 100644 index ac4b6fe07..000000000 --- a/client/coral-admin/webpack.config.dev.js +++ /dev/null @@ -1,41 +0,0 @@ -const path = require('path') -const autoprefixer = require('autoprefixer') -const precss = require('precss') - -module.exports = { - entry: { - 'bundle': path.join(__dirname, 'src', 'index') - }, - output: { - path: path.join(__dirname, '..', '..', 'dist', 'coral-admin'), - filename: '[name].js' - }, - module: { - loaders: [ - { test: /.js$/, loader: 'babel', include: path.join(__dirname, 'src'), exclude: /node_modules/ }, - { test: /\.json$/, loaders: 'json', include: __dirname, exclude: /node_modules/ }, - { test: /.css$/, loaders: ['style-loader', 'css-loader?modules&localIdentName=[name]__[local]___[hash:base64:5]', 'postcss-loader'] } - ] - }, - plugins: [ - autoprefixer, - precss, - new webpack.DefinePlugin({ - 'process.env': { - 'NODE_ENV': JSON.stringify('development'), - 'VERSION': JSON.stringify(require("./package.json").version) - } - }) - ], - resolve: { - root: [ - path.resolve('./src'), - path.resolve('../') - ] - }, - devServer: { - historyApiFallback: { - index: '/' - } - } -} \ No newline at end of file diff --git a/client/coral-admin/webpack.config.js b/client/coral-admin/webpack.config.js index a92f5ec26..7b6f0ee5c 100644 --- a/client/coral-admin/webpack.config.js +++ b/client/coral-admin/webpack.config.js @@ -3,6 +3,7 @@ const devConfig = require('./webpack.config.dev') const autoprefixer = require('autoprefixer') const precss = require('precss') const Copy = require('copy-webpack-plugin') +const webpack = require('webpack') module.exports = Object.assign({}, devConfig, { module: {