Skip to content
Snippets Groups Projects
webpack.config.js 495 B
Newer Older
const path = require('path');
const fs = require('fs');
Glenn Vorhes's avatar
Glenn Vorhes committed
let config = require('./webpack.base');

const demosDirectory = path.join(__dirname, 'test/demo');
const files = fs.readdirSync(demosDirectory);
let entries = {};
for (let f of files){
Glenn Vorhes's avatar
Glenn Vorhes committed
    let key = f.replace(/.tsx?$/, '.js');
    entries[key] = path.join(demosDirectory, f);
config.entry = entries;

config.output = {
    path: path.join(__dirname, 'test/serve/js'),
    filename: "[name]"

module.exports = config;