kevinoleary19 / Angular-2-Datepicker

A minimalist datepicker inspired by Google's material design
70 stars 71 forks source link

Error on importing module - Unexpected character '@' (9:0) #66

Open AlexFreem opened 7 years ago

AlexFreem commented 7 years ago

I have tried to include this directive in my project, but i got an next error in console:

` common.js:12192 ./~/angular2-material-datepicker/src/datepicker.module.ts Module parse failed: /home/freem/Work/Projects/maketalents-ui/node_modules/angular2-material-datepicker/src/datepicker.module.ts Unexpected character '@' (9:0) You may need an appropriate loader to handle this file type. export * from './datepicker.component';
@NgModule({
declarations: [ DatepickerComponent ],
exports: [ DatepickerComponent ],

@ ./~/angular2-material-datepicker/index.ts 1:0-40 `

I build my project with webpack and here is my part of webpack.config.js of TypeScript files loader:

module: { rules: [ { test: /\.ts$/, exclude: /node_modules/, use: ['ts-loader'] }] }

If i exclude Datepicker from dependecies and imports - project works correctly.

zskhan commented 7 years ago

Its a duplicate issue from https://github.com/koleary94/Angular-2-Datepicker/issues/68 this is because of compilation problem in this package and is resolved in PR https://github.com/koleary94/Angular-2-Datepicker/pull/52