1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
From: =?utf-8?q?Bastien_Roucari=C3=A8s?= <rouca@debian.org>
Date: Wed, 8 Nov 2023 11:35:04 +0000
Subject: Build for modern webpack and node
Do not transpile es6 and build for modern webpack (default export).
Do not bundle
---
yamlify-object/tsconfig.json | 2 +-
yamlify-object/webpack.config.ts | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/yamlify-object/tsconfig.json b/yamlify-object/tsconfig.json
index a28e76c..54cb355 100644
--- a/yamlify-object/tsconfig.json
+++ b/yamlify-object/tsconfig.json
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"module": "es6",
- "target": "es5",
+ "target": "es6",
"declaration": true,
"outDir": "./dist",
"sourceMap": true,
diff --git a/yamlify-object/webpack.config.ts b/yamlify-object/webpack.config.ts
index 30da868..b2ec355 100644
--- a/yamlify-object/webpack.config.ts
+++ b/yamlify-object/webpack.config.ts
@@ -16,12 +16,16 @@ module.exports = {
resolve: {
extensions: ['.ts'],
},
+ externals : [
+ /^(?!([.][/])?src[/]|([.][/]))/,
+ ],
output: {
filename: 'yamlify-object.js',
path: path.resolve(__dirname, 'dist'),
library: 'yamlifyObject',
libraryTarget: 'umd',
globalObject: 'this',
+ libraryExport: 'default',
clean: true,
},
};
|