question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Requiring CSS causes error in default vue-webpack template. Importing them does not.

See original GitHub issue

First 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:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ashitvora-zzcommented, Feb 21, 2018

How did you fix it?

0reactions
mariojankoviccommented, Feb 21, 2018

Please read my first comment:

installing the missing style-loader or rather replacing it with vue-style-loader in my webpack.config file

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found