A
A
andrewayder2021-11-25 04:47:07
Sass
andrewayder, 2021-11-25 04:47:07

How to connect webpack and scss project?

Hello,
I want to add animated text with a background in case js is disabled

<noscript>
    <div class='error-logo-title'>
      <span>
        plz enable js
      </span>
    </div>
  </noscript>

Accordingly, I need to load the styles, but since the styles have a long scss animation, I want to connect the compiled styles to css like this
<link href="<%= require('../src/error/style.css') %>" rel=stylesheet />
at the beginning of noscript
I also want to apply cssMinimizerPlugin to those styles.
How to implement it correctly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
resibe, 2021-12-06
@andrewayder

As an option, you can add an entry point for Vue
That is

module.exports = defineConfig({
  pages: {
    index: {
      entry: ["src/main.ts", "src/main.scss"],

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question