update development bundle
This commit is contained in:
@@ -8,13 +8,14 @@ import webpack from 'webpack';
|
||||
import WebpackDevServer from 'webpack-dev-server';
|
||||
import bodyParser from 'body-parser';
|
||||
|
||||
|
||||
import DB from './config/database';
|
||||
import routes from './routes';
|
||||
|
||||
const API_PORT = 8080;
|
||||
const APP_PORT = 3000;
|
||||
|
||||
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
|
||||
|
||||
var api = express();
|
||||
|
||||
/*
|
||||
@@ -40,7 +41,7 @@ DB.sync().then(()=>{
|
||||
* Development Server
|
||||
*/
|
||||
|
||||
var config = require('./config/webpack/development'),
|
||||
var config = require('./../client/config/webpack'),
|
||||
dev_server = new WebpackDevServer(webpack(config), {
|
||||
contentBase: __dirname + '/../client/build/development',
|
||||
publicPath: "/assets/",
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
var config = {
|
||||
modules: 'es6',
|
||||
targetVersion: '0.14.0',
|
||||
suffix: '.rt'
|
||||
};
|
||||
|
||||
export default config;
|
||||
@@ -1 +0,0 @@
|
||||
design.js
|
||||
@@ -1,48 +0,0 @@
|
||||
import webpack from 'webpack';
|
||||
|
||||
const ROOT = __dirname + '/../../../';
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
app: ROOT + 'client/app',
|
||||
style: ROOT + 'client/style'
|
||||
},
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
path: ROOT + 'client/build/development'
|
||||
},
|
||||
module: {
|
||||
loaders: [
|
||||
{
|
||||
test: /\.scss$/,
|
||||
loaders: ['style', 'raw', 'sass']
|
||||
}, {
|
||||
test: /\.css$/,
|
||||
loaders: ['style', 'raw']
|
||||
}, {
|
||||
test: /\.js$/,
|
||||
loader: 'babel'
|
||||
}, {
|
||||
test: /\.json$/,
|
||||
loader: 'json-loader'
|
||||
}
|
||||
]
|
||||
},
|
||||
sassLoader: {
|
||||
includePaths: [ROOT + 'client', ROOT + 'node_modules']
|
||||
},
|
||||
plugins: [
|
||||
new webpack.ProvidePlugin({
|
||||
$: "jquery",
|
||||
jQuery: "jquery",
|
||||
"window.jQuery": "jquery"
|
||||
}),
|
||||
new webpack.ProvidePlugin({
|
||||
d3: "d3",
|
||||
"window.d3": "d3"
|
||||
})
|
||||
],
|
||||
node: {
|
||||
fs: "empty"
|
||||
}
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
import ExtractTextPlugin from 'extract-text-webpack-plugin';
|
||||
import webpack from 'webpack';
|
||||
|
||||
const ROOT = __dirname + '/../../../';
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
app: ROOT + 'client/app',
|
||||
style: ROOT + 'client/style'
|
||||
},
|
||||
devtool: 'source-map',
|
||||
output: {
|
||||
filename: '[name].min.js',
|
||||
path: ROOT + 'client/build/production'
|
||||
},
|
||||
externals: {
|
||||
jquery: "$",
|
||||
d3: "d3"
|
||||
},
|
||||
module: {
|
||||
loaders: [
|
||||
{
|
||||
test: /\.scss$/,
|
||||
loader: ExtractTextPlugin.extract("style-loader", "raw-loader!sass-loader")
|
||||
}, {
|
||||
test: /\.css$/,
|
||||
loader: ExtractTextPlugin.extract("style-loader", "raw-loader")
|
||||
}, {
|
||||
test: /\.js$/,
|
||||
loader: 'babel'
|
||||
}, {
|
||||
test: /\.woff(\?v=[0-9]\.[0-9]\.[0-9])?$/,
|
||||
loader: "url-loader?limit=10000&minetype=application/font-woff"
|
||||
}, {
|
||||
test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
|
||||
loader: "file-loader"
|
||||
}
|
||||
]
|
||||
},
|
||||
sassLoader: {
|
||||
includePaths: [ROOT + 'client', ROOT + 'node_modules']
|
||||
},
|
||||
// Use the plugin to specify the resulting filename (and add needed behavior to the compiler)
|
||||
plugins: [
|
||||
new ExtractTextPlugin("style.min.css", {
|
||||
allChunks: true
|
||||
}),
|
||||
new webpack.optimize.UglifyJsPlugin({minimize: true}),
|
||||
new webpack.ProvidePlugin({
|
||||
$: "jquery",
|
||||
jQuery: "jquery",
|
||||
"window.jQuery": "jquery"
|
||||
})
|
||||
],
|
||||
node: {
|
||||
fs: "empty"
|
||||
}
|
||||
};
|
||||
@@ -37,8 +37,9 @@ export default function (opt) {
|
||||
generatedFile: replaceExtension(file.relative)
|
||||
}, opt);
|
||||
|
||||
if (options.suffix && !options.name) {
|
||||
options.name = normalizeName(path.basename(filePath, path.extname(filePath))) + options.suffix;
|
||||
if (options.modules === 'none' && !options.name) {
|
||||
options.name = normalizeName(path.basename(filePath, path.extname(filePath)));
|
||||
console.log('options.name ', options.name)
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user