Skip to content

Commit

Permalink
switching to ES imports
Browse files Browse the repository at this point in the history
  • Loading branch information
frankieali committed Jul 4, 2023
1 parent ef6023b commit 90dde0c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
13 changes: 6 additions & 7 deletions copyAssets.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
'use strict'
import copydir from 'copy-dir'
import path from 'path'
import fs from 'fs'
import readline from 'readline'
import { stdin as input, stdout as output } from 'process'

const copydir = require('copy-dir');
const path = require('path');
const fs = require('fs');
const readline = require('readline');
const { stdin: input, stdout: output } = require('process');
import { AbortController } from 'node-abort-controller' //polyfill for Node <v14

const { AbortController } = require('node-abort-controller'); //polyfill for Node <v14
const ac = new AbortController();
const signal = ac.signal;

Expand Down
13 changes: 6 additions & 7 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
const path = require('path')
const { defineConfig } = require('vite')
const copy = require('rollup-plugin-copy')
const del = require('rollup-plugin-delete')
const minifyEs = require('./rollup-plugin-minifyEs').default
// const { visualizer } = require('rollup-plugin-visualizer');
import path from 'path'
import { defineConfig } from 'vite'
import copy from 'rollup-plugin-copy'
import del from 'rollup-plugin-delete'
import minifyEs from './rollup-plugin-minifyEs'

module.exports = defineConfig({
export default defineConfig({
base: process.env.NODE_ENV === 'production' ? './' : './src',
build: {
lib: {
Expand Down

0 comments on commit 90dde0c

Please sign in to comment.