Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add webpack 5 support #160

Closed
wants to merge 1 commit into from

Conversation

bloodlit
Copy link

@bloodlit bloodlit commented Nov 6, 2020

No description provided.

@bloodlit bloodlit mentioned this pull request Nov 6, 2020
@devsuitup
Copy link

Thank you so much dude !

@icleolion
Copy link
Contributor

Seeing as this loader doesn't claim to support webpack 3 I would take this PR over #158

@bloodlit
Copy link
Author

Seeing as this loader doesn't claim to support webpack 3 I would take this PR over #158

// webpack4 and lower
VuetifyLoaderPlugin = require('./plugin-webpack4')

If earlier Webpack 3 was provided, then it will work.

@hmnd
Copy link

hmnd commented Nov 14, 2020

Seeing as this loader doesn't claim to support webpack 3 I would take this PR over #158

// webpack4 and lower
VuetifyLoaderPlugin = require('./plugin-webpack4')

If earlier Webpack 3 was provided, then it will work.

Your PR is basically a duplicate of #158 though. Why open a new one?

loader: require.resolve('./loader'),
options: {
match: this.options.match || [],
attrsMatch: this.options.attrsMatch || []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
attrsMatch: this.options.attrsMatch || []
attrsMatch: this.options.attrsMatch || [],
registerStylesSSR: this.options.registerStylesSSR || false

Is registerStylesSSR deliberately not included in the webpack5 version or was this an oversight?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oversight

@icleolion
Copy link
Contributor

@hmnd There are a handful of differences so if @bloodlit feels his attempt is better than #158 then why not raise a new PR.

@bloodlit my point about webpack 3 support is based on vue-loader/commit/745d054. They had to beef up that if check to support webpack 3 for some reason. But vue-loader lists webpack 3 as one of it's peerDependencies, whereas vuetify-loader does not, so that extra check included in #158 is a waste of bytes.

Speaking of peerDependencies , neither this PR nor #158 update the peerDependencies to include support for webpack 5.

Also, there has been a number of developments to webpack 5 that vue-loader has had to keep up with. I'm assuming vue-loader's implementation inspired this PR just like it did with #158, so do any of the below commits inspire further development on this PR to better support webpack 5?

  1. feat: support Rule.rules (nested rules) (#1618)
  2. fix: ensure unique ident when cloning rules, fix webpack 5 compatibility (#1653)
  3. fix: skip matching rule with 'enforce'
  4. fix: ensure new webpack5 generator property in rules passes ruleset checks (#1753)
  5. fix: add rule plugins to keep up with webpack 5 new features

@petrprikryl
Copy link

petrprikryl commented Nov 24, 2020

Hi, I am trying this PR on my project and have problem with styles order in development. My custom styles are being overriden by Vuetify styles:

image

.v-select styles should be ignored as it should be loaded before my custom .catalogue__sort. Problem seems to be with inline style blocks ordering in dev mode. Very strange is that this is not happening after bundling and serving plain css without dev server.

Next I tried to import whole vuetify/dist/vuetify.min.css and disable vuetify-loader and this problem wasn't happening. So I am suspecting that the problem is here. Because I wasn't facing it with Webpack 4 and offical version 1.6.0 of vuetify-loader.

Can anybody push me the right way where the problem is?

@deleonio
Copy link

deleonio commented Dec 4, 2020

I checked this PR - It build, but there a lot of errors in SASS.


the same story here:

Many thanks to Angular for influencing Webpack and the unconsolidated upgrade to v5.

@DRoet
Copy link
Contributor

DRoet commented Jan 4, 2021

Checked this PR now that @vue/cli-service": "5.0.0-alpha.0 is out, but it indeed throws a lot of SASS errors

@KaelWD
Copy link
Member

KaelWD commented Jan 6, 2021

Yeah I have my own implementation in progress that works with progressiveImages and has less code duplication. Thanks for the effort but it doesn't really cut it.

@KaelWD KaelWD closed this Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants