removing watch adding webpack const for env vars

This commit is contained in:
Belen Curcio
2016-11-08 17:49:48 -03:00
parent 86350800c2
commit cba476edfe
3 changed files with 1 additions and 42 deletions
-1
View File
@@ -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": [],
-41
View File
@@ -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: '/'
}
}
}
+1
View File
@@ -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: {