easy-typing-input-tool
Version:
A tool utilizing google input tool for the use of easy typing repositories such as ENT, EHt & EBT
39 lines (33 loc) • 999 B
JavaScript
const path = require('path');
const glob = require('glob');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const inProduction = (process.env.NODE_ENV === 'production');
//https://www.phase2technology.com/blog/bundle-your-front-end-with-webpack
module.exports = {
entry : {
'easy-typing-input-tool': glob.sync('./index.js'),
'google-transliteration': glob.sync('./src/transliteration.js'),
// 'all': glob.sync('./assets/**/*.js'),
// 'individualJs':[
// './assets/main/1.js',
// './assets/main/2.js',
// './assets/anotherFolder/3.js',
// ]
},
output: {
path: path.join(__dirname, 'dist'),
filename: '[name]-bundle.js'
},
watch: true,
module: {
rules: [
{ test: /\.js$/, exclude: /node_modules/, loader: "babel-loader" }
]
},
plugins: []
};
if (inProduction) {
module.exports.plugins.push(
new UglifyJsPlugin()
);
}