mirror of
https://github.com/wassname/talk.git
synced 2026-07-13 17:45:56 +08:00
removing watch adding webpack const for env vars
This commit is contained in:
@@ -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": [],
|
||||
|
||||
@@ -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: '/'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user