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

feat: Add support for SCSS styles #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ThPadelis
Copy link

Closes #46

@Asored-D
Copy link

Hi @ThPadelis, thanks for your contribution! Does the generation of frontend.css and admin.css work for you?

@ThPadelis
Copy link
Author

Yes, it does. Do you experience a problem? If yes, let us know what is it and what have you tried till now

@Asored-D
Copy link

Hi @ThPadelis, thanks for the fast response! Cloning the original repo, the generation of frontend.css and admin.css does not work. No error messages, but also no css files generated.

As workaround I have to modify the following lines:

var entryPoint = {
  frontend: ["./src/frontend/main.js", "./assets/scss/frontend.scss"],
  admin: ["./src/admin/main.js", "./assets/scss/admin.scss"],
  style: ['./assets/scss/style.scss'],
};

and

{
  test: /\.scss$/,
  use: [
    'vue-style-loader', 
    {
      loader: MiniCssExtractPlugin.loader,
      options: {
          esModule: false,
      },
    }, 
    'css-loader', 
    'sass-loader'
  ]
}

Additionally I created the files admin.scss and frontend.scss in the assets/scss folder. With this setup the admin.css and frontend.css gets generated. But I think thats just a dirty workaround.. :-)

@ThPadelis
Copy link
Author

No need to create and add these files as entry points, unless you actually need this. You can simple create src/admin/style.scss or/and src/frontend/style.scss and import it in the corresponding src/main.js file just like a normal Vue application. With your current webpack config, the app will automatically create the assets/css/admin.css or/and assets/css/frontend.css files

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.

[Request] Can you add SASS complication too?
2 participants