M
M
Maxim2020-11-26 09:08:58
Vue.js
Maxim, 2020-11-26 09:08:58

Style hashing in nuxtjs?

Good afternoon, tell me, is there a layout of the main default.vue

<template>
  <div id="app">
    <Header />
    <main>
      <LeftSidebar />
      <div class="contentWrapper">
        <Nuxt />
      </div>
      <RightSidebar />
    </main>
    <Footer />
  </div>
</template>

<style lang="scss">
html {
  font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  word-spacing: 1px;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}
body {
  margin: 0;
  padding: 0;
}
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}
.container {
  margin-right: auto;
  margin-left: auto;
  padding-left: 60px;
  padding-right: 60px;
}
.contentWrapper {
  max-width: calc(100% - 630px);
  flex-basis: calc(100% - 630px);
  padding: 0 30px 60px;
}
</style>


how to use the .container container style with hashing in nuxt.config.js in the build set the settings for class hashing in the child components bound to this template

:class="$style.container"


loaders: {
      cssModules: {
        modules: {
          localIdentName: "[hash:base64:6]",
        }
      }
    },

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question