Skip to content

Commit

Permalink
[WRONG FIX] Just to share, use notation
Browse files Browse the repository at this point in the history
  "main": "./dist/ods-charts.js",
  "module": "./dist/ods-charts.esm.js",
  • Loading branch information
jacques-lebourgeois committed Dec 18, 2023
1 parent 6205fcf commit 4d9ff7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"files": [
"./dist/**/*"
],
"type": "module",
"main": "./dist/ods-charts-module.js",
"main": "./dist/ods-charts.js",
"module": "./dist/ods-charts.esm.js",
"types": "./dist/ods-charts.d.js",
"scripts": {
"build": "webpack",
Expand Down
10 changes: 3 additions & 7 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import path from 'node:path';
import { fileURLToPath } from 'node:url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const path = require('path');

const defaultConfig = {
mode: 'development',
Expand All @@ -23,7 +19,7 @@ const defaultConfig = {
},
};

export default [
module.exports = [
{
...defaultConfig,
output: {
Expand All @@ -39,7 +35,7 @@ export default [
...defaultConfig,
output: {
path: path.resolve(__dirname, './dist'),
filename: 'ods-charts-module.js',
filename: 'ods-charts.esm.js',
library: {
type: 'module',
},
Expand Down

0 comments on commit 4d9ff7f

Please sign in to comment.