Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Not able to add next-sass the project #7

Open
raghavgarg1257 opened this issue Nov 29, 2018 · 1 comment
Open

Not able to add next-sass the project #7

raghavgarg1257 opened this issue Nov 29, 2018 · 1 comment

Comments

@raghavgarg1257
Copy link

Hey, Thanks for great exmaple.

I tried addnig @zeit/next-sass in this project by adding below code in next.config.js.

const withSass = require("@zeit/next-sass");
const path = require('path')

module.exports = withSass({
  webpack: (config, { dev }) => {
    // Perform customizations to webpack config

    // Important: return the modified config
    // config.resolve.modules = [path.resolve(__dirname, "components"), "node_modules"]
    return config
  },
  webpackDevMiddleware: (config) => {
    // Perform customizations to webpack dev middleware config

    // Important: return the modified config
    return config
  }
})

but upon running npm run dev, it keeps giving me error.

/private/tmp/next-go/node_modules/mini-css-extract-plugin/dist/index.js:21
} = _webpack2.default;
^
TypeError: Cannot destructure property createHash of 'undefined' or 'null'.
at Object. (/private/tmp/next-go/node_modules/mini-css-extract-plugin/dist/index.js:21:5)
at Module._compile (module.js:652:30)
at Module._compile (/private/tmp/next-go/node_modules/source-map-support/source-map-support.js:492:25)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (/private/tmp/next-go/node_modules/mini-css-extract-plugin/dist/cjs.js:3:18)

is there a way we can add saas to this project?

@raghavgarg1257 raghavgarg1257 changed the title Not able to add next-sass in this project Not able to add next-sass the project Nov 29, 2018
@raghavgarg1257
Copy link
Author

This also doesn't seem to work

const withSass = require('@zeit/next-sass')
module.exports = withSass({
  webpack(config, options) {
    return config
  }
})

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant