ligo/tools/compact-ligo-ide/webpack.config.js
2020-04-25 10:51:01 +00:00

30 lines
592 B
JavaScript

const path = require('path');
const nodeExternals = require("webpack-node-externals");
module.exports = {
mode: 'production',
entry: './src/index.tsx',
output: {
path: path.resolve('lib'),
filename: 'index.js',
libraryTarget: 'commonjs2'
},
module: {
rules: [
{
test: /\.(t|j)sx?$/,
exclude: /(node_modules)/,
use: 'babel-loader'
},
{
test: /\.css$/,
use: ["style-loader", "css-loader"],
},
]
},
externals: [nodeExternals()],
resolve: {
extensions: ['.ts', '.tsx', '.js', '.jsx']
},
}