aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vnext/.gitignore2
-rw-r--r--vnext/package.json7
-rw-r--r--vnext/server.js15
-rw-r--r--vnext/webpack.config.js9
4 files changed, 6 insertions, 27 deletions
diff --git a/vnext/.gitignore b/vnext/.gitignore
index 02fb90e6..f47a86b1 100644
--- a/vnext/.gitignore
+++ b/vnext/.gitignore
@@ -1,2 +1,2 @@
node_modules/**
-public/** \ No newline at end of file
+dist/** \ No newline at end of file
diff --git a/vnext/package.json b/vnext/package.json
index d3b30ff5..0c74982f 100644
--- a/vnext/package.json
+++ b/vnext/package.json
@@ -2,18 +2,19 @@
"name": "juick",
"version": "1.0.0",
"description": "",
- "main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
- "compile": "webpack --colors -p"
+ "compile": "webpack --mode=development",
+ "dist": "webpack --mode=production",
+ "start": "webpack-dev-server --inline --hot"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
- "babel-preset-env": "^1.6.1",
"babel-core": "^6.26.0",
"babel-loader": "^7.1.3",
+ "babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"css-loader": "^0.28.10",
"file-loader": "^1.1.11",
diff --git a/vnext/server.js b/vnext/server.js
deleted file mode 100644
index 600e954a..00000000
--- a/vnext/server.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var webpack = require("webpack");
-var WebPackDevServer = require("webpack-dev-server");
-var config = require("./webpack.config");
-
-new WebPackDevServer(webpack(config), {
- publicPath: config.output.publicPath,
- hot: true,
- inline: true,
- historyApiFallback: true
-}).listen(3000, 'localhost', function (err, result) {
- if (err) {
- return console.log(err);
- }
- console.log("listening")
-}) \ No newline at end of file
diff --git a/vnext/webpack.config.js b/vnext/webpack.config.js
index 89366a2a..f64e5749 100644
--- a/vnext/webpack.config.js
+++ b/vnext/webpack.config.js
@@ -1,20 +1,13 @@
var webpack = require("webpack");
module.exports = {
- devtool: 'eval',
entry: {
"vendor": ['react', 'react-dom', 'react-markdown', 'whatwg-fetch'],
"app": [
'file-loader?name=index.html!./src/views/index.html',
__dirname + "/src/app.js",
- __dirname + "/src/style/main.css",
- 'webpack-dev-server/client?http://localhost:3000',
- 'webpack/hot/only-dev-server'
+ __dirname + "/src/style/main.css"
]
},
- output: {
- path: __dirname + "/public",
- filename: "[name].js"
- },
module: {
rules: [
{ test: /\.css$/, loader: "style-loader!css-loader" },