Typescript import * from .js | flatpickr.js | .net core

822 Views Asked by At
import * as Flatpickr from 'flatpickr';
import { ru as Russian } from '../../lib/flatpickr/dist/l10n/ru.js';

i got the error: --allowJs is not set.

i tried the solution posted here Requiring a JavaScript Node.js module in TypeScript (allowJs' is not set)

"outDir": "./built", <--- add this
"allowJs": true,  <--- and this

Now i cant build my project in VS2017, because nuget packages are not found. Am i missing something?

My nugets are working fine when outdir/rootdir are set to "wwwroot", but then i get this "Cannot write file '...components.js' because it would overwrite input file"

0

There are 0 best solutions below