Skip to content

Commit

Permalink
config
Browse files Browse the repository at this point in the history
  • Loading branch information
jakub-roch committed Oct 3, 2024
1 parent 3fc3a47 commit 186f2b2
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ env.js
dist/
lib/
.DS_Store
temp_types/

\.history/
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ yarn-error.log
env.js
lib/
.DS_Store
temp_types/

\.history/
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "cloudinary-video-player-profiles",
"version": "1.0.0",
"description": "",
"main": "dist/main.js",
"module": "./lib/index.js",
"main": "./lib/index.js",
"scripts": {
"build": "NODE_ENV=production webpack"
},
Expand Down
17 changes: 7 additions & 10 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"baseUrl": ".",
"esModuleInterop": true,
"lib": ["ES2021"],
"module": "CommonJS",
"moduleResolution": "Node",
"noImplicitReturns": true,
"outDir": "./lib",
"allowSyntheticDefaultImports": true,
"module": "esnext",
"moduleResolution": "node",
"target": "es2020",
"declaration": true,
"resolveJsonModule": true,
"sourceMap": true,
"skipLibCheck": true,
"strict": true,
"target": "ES2021"
"esModuleInterop": true
},
"exclude": ["node_modules"]
}
20 changes: 15 additions & 5 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
const CopyWebpackPlugin = require('copy-webpack-plugin');
const path = require('path');
const outputPath = path.resolve(__dirname, './dist');
const outputPath = path.resolve(__dirname, './lib');

module.exports = {
mode: 'production',
entry: './src/index.ts',
entry: {
'index': './src/index.ts',
},
devtool: 'source-map',
output: {
filename: `[name].js`,
path: outputPath
filename: '[name].js',
path: outputPath,
publicPath: '',
library: {
type: 'module'
},
},
resolve: {
extensions: ['.ts', '.tsx', '.json'],
Expand All @@ -18,7 +25,7 @@ module.exports = {
{
test: /\.tsx?$/i,
exclude: /node_modules/,
use: ['ts-loader'],
loader: 'ts-loader',
}
]
},
Expand All @@ -30,4 +37,7 @@ module.exports = {
}]
})
],
experiments: {
outputModule: true
}
};

0 comments on commit 186f2b2

Please sign in to comment.