webcat12345 / ngx-ui-switch

Angular UI Switch component
https://webcat12345.github.io/ngx-ui-switch/demo/
MIT License
111 stars 68 forks source link

typescript build error #132

Closed Fauziku2 closed 7 years ago

Fauziku2 commented 7 years ago

Hi,

First, thanks for the great component. When building I am getting this error:

ERROR in ./~/ngx-ui-switch/src/index.ts Module build failed: Error: Typescript emitted no output for /Users/Fauzi/code/mx/maritimexchange/node_modules/ngx-ui-switch/src/index.ts. You should not need to recompile .ts files in node_modules. Please contact the package author to advise them to use --declaration --outDir. More https://github.com/Microsoft/TypeScript/issues/12358 at Object.loader (/Users/Fauzi/code/mx/maritimexchange/node_modules/ts-loader/dist/index.js:32:15) @ ./src/common/common.module.ts 22:12-40 @ ./src/app/app.module.ts @ ./src/main.ts @ multi (webpack)-dev-server/client?http://localhost:3000 ./src/main.ts Child html-webpack-plugin for "index.html": chunk {0} index.html 519 bytes [entry] webpack: Failed to compile.

Could you help please?

cmckni3 commented 7 years ago

The project actually needs a build process. The current build process doesn't build the library correctly for use with Angular. I made a fix to the README in my fork but got an error about using the main file, dist/index.js.

I am going to work on a build process and send a PR if that's ok with you, @webcat12345.