Skip to content

gaptree/gap-node-webpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gap Node Webpack

Install

yarn add gap-node-webpack

Usage

'use strict';

const path = require('path');

require('gap-node-webpack').build({
    contextDir: path.resolve(__dirname, 'src/js'),
    outputDir: path.resolve(__dirname, 'dist/js'),
    minimize: true,
    modules: [
        path.resolve(__dirname, 'module/js')
    ],
    entry: {
        main: './main.js'
    }
});
'use strict';

const express = require('express');
const path = require('path');
const middleware = require('gap-node-webpack').middleware;

const app = express();
const port = '8007';
const publicSlug = 'js';

app.use(middleware({
    contextDir: path.resolve(__dirname, 'src/js'),
    outputDir: path.resolve(__dirname, 'dev/js'),
    modules: [
        path.resolve(__dirname, 'module/js/')
    ],
    sourceMap: true,
    publicSlug: publicSlug,
    entry: {
        main: './main.js'
    }
}));

app.listen(port, function () {
    console.log('Front server listening on port ' + port + '!');
});

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published