Skip to content

Commit

Permalink
skip:build fix esbuild issues
Browse files Browse the repository at this point in the history
  • Loading branch information
oze4 committed Jul 26, 2021
1 parent 9f1f871 commit d37ff60
Show file tree
Hide file tree
Showing 5 changed files with 14,371 additions and 41 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.docz
.vscode
dist
dist_esbuild
node_modules
yarn.lock
.idea
Expand Down
8 changes: 6 additions & 2 deletions __tests__/demo/demo-components/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import React, { useState, useRef } from 'react';
import MaterialTable, { MTableBodyRow, MTableEditRow } from '../../../src'; // root of this project
// import { ExportCsv, ExportPdf } from '../../../exporters'; // root of this project

// root of this project
// import MaterialTable, { MTableBodyRow, MTableEditRow } from '../../../src';

// Uncomment to test using esbuild
import MaterialTable, { MTableBodyRow, MTableEditRow } from '../../../dist';

export { default as EditableRowDateColumnIssue } from './EditableRowDateColumnIssue';

Expand Down
4 changes: 2 additions & 2 deletions esbuild.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const fs = require('fs');
const { log } = console;
const { stdout, stderr, exit } = process;

const BUILD_DIR = 'dist'; // relative to root of project (no trailing slash)
const BUILD_DIR = 'dist_esbuild'; // relative to root of project (no trailing slash)

stdout.write(yellow(`-Cleaning build artifacts from : '${BUILD_DIR}' `));

Expand All @@ -36,7 +36,7 @@ rimraf(path.resolve(__dirname, BUILD_DIR), async (error) => {
const options = {
entryPoints: getFilesRecursive('./src', '.js'),
minify: true,
// format: 'esm',
bundle: false,
outdir: `${BUILD_DIR}`,
loader: {
'.js': 'jsx'
Expand Down
Loading

0 comments on commit d37ff60

Please sign in to comment.