e47b5ec192
related to #1553 - registering helpers on an instance retrieved via `import`, compiling the template on an instance retrieved via `require` - using `@roundingwellos/babel-plugin-handlebars-inline-precompile` to load plugins inline
33 lines
693 B
JavaScript
33 lines
693 B
JavaScript
const fs = require('fs');
|
|
|
|
const testFiles = fs.readdirSync('src');
|
|
const entryPoints = {};
|
|
testFiles
|
|
.filter(file => file.match(/-test.js$/))
|
|
.forEach(file => {
|
|
entryPoints[file] = `./src/${file}`;
|
|
});
|
|
|
|
module.exports = {
|
|
entry: entryPoints,
|
|
output: {
|
|
filename: '[name]',
|
|
path: __dirname + '/dist'
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.js?$/,
|
|
exclude: /node_modules/,
|
|
use: {
|
|
loader: 'babel-loader',
|
|
options: { cacheDirectory: false },
|
|
}
|
|
}
|
|
]
|
|
},
|
|
optimization: {
|
|
minimize: false
|
|
}
|
|
};
|