前提・実現したいこと
今nuxt.jsの勉強をしているのですが、
https://ja.nuxtjs.org/api/configuration-css/ を参考に
scssで記述したものをグローバルのcssとしてインクルードしようとすると
以下のようなエラーを吐きます。色々しらべたのですが英語がわからず...。
手助けしていただけますと幸いです...!
###nuxt.config.js
module.exports = {
/*
** Headers of the page
*/
head: {
title: 'projecthokusai',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: 'Nuxt.js project' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},
css: [
{ src:'~/assets/scss/main.scss' }
],
build: {
/*
** Run ESLint on save
*/
extend (config, { isDev, isClient }) {
if (isDev && isClient) {
config.module.rules.push({
enforce: 'pre',
test: /.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/
})
}
}
},
// modules: [
// ['nuxt-sass-resources-loader', [
// '@/assets/scss/main.scss',
// ]],
// ],
}
発生している問題・エラーメッセージ
ERROR Failed to compile with 1 errors 3:14:28 PM
error in ./assets/scss/main.scss
Module build failed:
// Copyright Joyent, Inc. and other Node contributors.
^
Invalid CSS after "...N THE SOFTWARE.": expected 1 selector or at-rule, was "var formatRegExp = "
in /Users/sugieryoku/Dropbox/作業中/project_hokusai/site_front/projecthokusai/node_modules/util/util.js (line 1, column 1)
@ ./assets/scss/main.scss 4:14-199 13:3-17:5 14:22-207
@ ./.nuxt/App.js
@ ./.nuxt/index.js
@ ./.nuxt/client.js
@ multi webpack-hot-middleware/client?name=client&reload=true&timeout=30000&path=/__webpack_hmr ./.nuxt/client.js
追加で必要な情報などありましたらお教えください。
何卒よろしくお願い致します。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。