Files
standardnotes-app-web/packages/sncrypto-web/webpack.config.js
2022-07-06 12:21:21 +02:00

44 lines
819 B
JavaScript

const path = require('path')
module.exports = {
entry: {
'sncrypto-web.js': './src/index',
},
resolve: {
extensions: ['.ts', '.js'],
fallback: {
crypto: false,
path: false,
},
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: './[name]',
chunkFilename: '[name].bundle.js',
library: 'SNCrypto',
libraryTarget: 'umd',
umdNamedDefine: true,
publicPath: '/dist/',
},
optimization: {
minimize: false,
},
module: {
rules: [
{
test: /\.ts(x?)$/,
exclude: /node_modules/,
use: [{ loader: 'babel-loader' }, { loader: 'ts-loader' }],
},
{
test: /\.(js)$/,
loader: 'babel-loader',
},
],
},
plugins: [],
stats: {
colors: true,
},
devtool: 'source-map',
}