Open robbiemu opened 7 years ago
Hi, Try this to import Datepicker
Vue.component('Datepicker', require('vue-material-datepicker/src/Datepicker.vue'));
I did try that but it had issues finding its dependencies, both external and in the src directory. But if that would work, or not, the main one should work either with vue or vue/dist/vue if you ask me
I have the exact same issue, @robbiemu , do you have solution yet?
same problem. And need to fix readme: $ npm install vue-material-datepicker instead $ npm install vue-datepicker
@arnoldgithub no actually I moved on. I can get it to load but the calendar doesn't look right.
To load it: 1 import the source component:
import DatePicker from 'vue-material-datepicker/src/Datepicker.vue'
2 set up your project to handle scss as a style language specification. In your webpack config, add options to your .vue file handler, to conform to the pattern:
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
options: {
// vue-loader options
loaders: {
scss: 'style-loader!css-loader!sass-loader'
}
}
},
...
Optionally, also support .scss
files while you're there:
{
test: /\.scss$/,
loader: ['style-loader', 'css-loader', 'sass-loader']
}
npm i -D node-sass
, but I think all the current templates have it now.npm i -S moment moment-range
too
I'm getting:
here's my package.json dependencies:
and I mount it with:
ps> I tried aliasing in
vue: 'vue/dist/vue.js'
in my webpack config and it is still breaking