mirror of
https://github.com/sasjs/adapter.git
synced 2025-12-10 17:04:36 +00:00
feat(*): recreate package with new name
This commit is contained in:
49
webpack.config.js
Normal file
49
webpack.config.js
Normal file
@@ -0,0 +1,49 @@
|
||||
const path = require("path");
|
||||
const webpack = require("webpack");
|
||||
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
|
||||
|
||||
const browserConfig = {
|
||||
entry: "./src/index.ts",
|
||||
devtool: "inline-source-map",
|
||||
mode: "development",
|
||||
optimization: {
|
||||
minimize: false,
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.ts?$/,
|
||||
use: "ts-loader",
|
||||
exclude: /node_modules/,
|
||||
},
|
||||
],
|
||||
},
|
||||
resolve: {
|
||||
extensions: [".ts", ".js"],
|
||||
},
|
||||
output: {
|
||||
filename: "index.js",
|
||||
path: path.resolve(__dirname, "build"),
|
||||
libraryTarget: "umd",
|
||||
library: "SASjs",
|
||||
},
|
||||
plugins: [
|
||||
new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /en/),
|
||||
new webpack.SourceMapDevToolPlugin({
|
||||
filename: null,
|
||||
exclude: [/node_modules/],
|
||||
test: /\.ts($|\?)/i,
|
||||
}),
|
||||
],
|
||||
};
|
||||
|
||||
const nodeConfig = {
|
||||
...browserConfig,
|
||||
target: "node",
|
||||
output: {
|
||||
...browserConfig.output,
|
||||
path: path.resolve(__dirname, "build", "node"),
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = [browserConfig, nodeConfig];
|
||||
Reference in New Issue
Block a user