Skip to content
Permalink
Browse files

webpack++

  • Loading branch information...
jonyrock committed Aug 13, 2019
1 parent ed3f22b commit 210261c1fda852cf96c609e227af8fd6c70d13d2
Showing with 579 additions and 4 deletions.
  1. +2 −1 .gitignore
  2. +8 −0 app.js
  3. +19 −0 build/webpack.base.conf.js
  4. +5 −0 build/webpack.dev.conf.js
  5. +5 −0 build/webpack.prod.conf.js
  6. +536 −0 package-lock.json
  7. +4 −3 package.json
@@ -1 +1,2 @@
node_modules
node_modules
dist/*
8 app.js
@@ -0,0 +1,8 @@
var express = require('express');
var app = express();

app.get('/', function(req, res){
res.send("Hello world!");
});

app.listen(3000);
@@ -0,0 +1,19 @@
const path = require('path');


function resolve(p) {
return path.resolve(__dirname, './../', p);
}

module.exports = {
target: 'node',
node: {
__dirname: false,
__filename: false,
},
entry: [ './app.js' ],
output: {
filename: "app.js",
path: resolve('dist')
},
}
@@ -0,0 +1,5 @@
const base = require('./webpack.base.conf');

base.mode = 'development';

module.exports = base;
@@ -0,0 +1,5 @@
var base = require('./webpack.base.conf');

base.mode = 'production';

module.exports = base;

0 comments on commit 210261c

Please sign in to comment.
You can’t perform that action at this time.