You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.1 KiB

8 years ago
'use strict'
const path = require('path')
const CleanWebpackPlugin = require('clean-webpack-plugin')
module.exports = {
mode: 'production',
target: 'node',
entry: './src/index',
output: {
path: path.resolve(__dirname, './dist'),
filename: 'lua2js.js',
library: 'lua2js',
libraryTarget:'umd'
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: [
{
loader: 'babel-loader',
options: {
cacheDirectory: true,
presets: [
["@babel/preset-env", {
targets: {
node: "current"
}
}]
]
}
}
]
}
]
},
plugins: [
new CleanWebpackPlugin(['dist'])
]
}