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.
|
|
|
|
'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: 'lua-in-js.js',
|
|
|
|
|
library: 'lua-in-js',
|
|
|
|
|
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'])
|
|
|
|
|
]
|
|
|
|
|
}
|