UNPKG

wix-style-react

Version:
22 lines (20 loc) 846 B
const execa = require('execa'); /** * * The .d.ts files you use are an input to the build system but not an output. * It's perfectly reasonable to consume some types from a .d.ts but have your * output not use those types, so there'd be no reason to distribute the * input .d.ts with your build results. * * [...] It sounds like you'll want a * post-build step in your build tool to copy the relevant .d.ts files wherever * you need them. The .d.ts files are considered "references" the compiler will * not touch them, not move them, or recreate them. An easy way to think of * the .d.ts files is that they go along with your .js files. if you are * copying the .js files, you should copy the matching .d.ts. */ module.exports = () => { return Promise.all([ execa.command(`copyfiles -u 1 src/**/*.d.ts dist/types`), ]); };