Requiring CSS causes error in default vue-webpack template. Importing them does not.
See original GitHub issueFirst of all, thank you for this amazing port. I’m not a native chinese speaker so I had to clear the default issue template. 😃
This is the error I get when I try to import vue-quill as it is:
ERROR in ./~/babel-loader/lib!./~/vue-loader/lib/selector.js?type=script&index=0!./~/vue-quill-editor/src/editor.vue
Module not found: Error: Can't resolve 'style-loader' in '/Users/mario/project'
@ ./~/babel-loader/lib!./~/vue-loader/lib/selector.js?type=script&index=0!./~/vue-quill-editor/src/editor.vue 9:0-36
@ ./~/vue-quill-editor/src/editor.vue
@ ./~/vue-quill-editor/index.js
@ ./src/main.js
@ multi ./build/dev-client ./src/main.js
I’ve noticed you used require
to import the default CSS styles for quill (editor.vue
lines 9-11). At the bottom of the editor.vue
file there seems to be a <style> attribute already, so what I did is I just imported all of the default quill styles using the default css @import
method instead of using require
. Now I’m curious – why did you use require in the first place? Is importing them wrong?
In any case, it works for me so If you want I can make a pull request with the above mentioned changes?
Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Webpack not loading Vue's single file components CSS
I think postCSS is not the issue, I've added it via npm and added to webpack css chain and still doesn't work. It...
Read more >babel-loader - webpack
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >Getting Started - BootstrapVue
These are Bootstrap v4.6 utility classes that help control padding, margins, positioning ... Webpack example @import '~bootstrap'; @import '~bootstrap-vue';.
Read more >Getting Started - Vue Loader
Follow this guide if the built-in configuration of Vue CLI does not suit your needs, or you'd rather create your own webpack config...
Read more >API - esbuild
By default esbuild will not bundle the input files. ... For example, the js loader interprets the file as JavaScript and the css...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
How did you fix it?
Please read my first comment: