Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure bundled files #508

Open
pedrouid opened this issue Feb 12, 2020 · 0 comments
Open

Configure bundled files #508

pedrouid opened this issue Feb 12, 2020 · 0 comments

Comments

@pedrouid
Copy link

@pedrouid pedrouid commented Feb 12, 2020

I want to configure the name of the output files and which files are bundled.

By default, the JS that are output'd are an index file, cjs and esm files with both production and development versions and respective maps. But I want to build a single umd file named index.js.

So I added the following flags to the build command:

tsdx build --format umd --name index

However this while output no index file and two umd files both production and development versions and respective maps.

So I just added postbuild script to copy the contents of the production files and delete the other files.

# rename dist files
cp ./dist/index.umd.production.min.js ./dist/index.js 
cp ./dist/index.umd.production.min.js.map ./dist/index.js.map

# delete duplicates
rm -rf ./dist/index.umd.*

Ideally all I want to output is a single production minified file called index.js and respective map index.js.map.

How can I achieve this by configuring the tsdx.config.js??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.