Open kissge opened 6 years ago
create file 'shims-html.d.ts' in src and insert
declare module '*.html' {
import Vue, { ComponentOptions, FunctionalComponentOptions } from 'vue'
interface WithRender {
<V extends Vue, U extends ComponentOptions
@salim-dev Working for me.. Thanks!
i lost "some" time trying to use the chainWebpack without success.
chainWebpack: function(config) {
config.module
.rule('html')
.test(/\.html$/)
.exclude.add(/index\.html/).end()
.set('loader', 'vue-template-loader')
.end();
}
configureWebpack works but removes the comments using vue inspect
.
Any idea if we can mix global and scoped styles with vue-template-loader?
Like: https://vue-loader.vuejs.org/guide/scoped-css.html#mixing-local-and-global-styles
I also shim-scss.d.ts
for an import like import WithRender from './helloworld.html?style=./helloworld.scss';
Ill definitely do some more test... and research with vue-loader 15 we never know.
Thanks for this great plugin. I've been trying hard for vue-template-loader to work with vue-cli 3, which is RC atm, but still no luck. What I did:
@vue/cli
The result is https://github.com/kissge/vue-template-loader-test
When I run
npm run serve
these messages are shown:Newer version of vue doesn't use webpack.config.js so I cannot tweak that as was instructed in README, and I'm thinking it is related to the problem. Does vue-template-loader work under these conditions?
Thanks.