cyclejs-community / one-fits-all

The one-fits-all flavor for create-cycle-app
MIT License
34 stars 8 forks source link

sass cannot resolve node modules #33

Closed adithep closed 7 years ago

adithep commented 7 years ago

I think it would make more sense for webpack setting for sass loader to include node_modules like so:

{
     loader: 'sass-loader',
     options: {
         includePaths: [ './node_modules' ],
         sourceMap: true,
      },
},

The reason being a lot of sass packages in npm requires this path resolution.

In my webpack.config I was able to solve it with:

module.exports = createConfig([
    entryPoint({
        main: [appPath('src', 'index.ts'), appPath('src', 'css', 'styles.scss')]
    }),
    setOutput({
        filename: 'bundle.[hash].js',
        path: appPath('build')
    }),
    sass({
        includePaths: [ appPath('node_modules') ],
        sourceMap: true,
    })
]);

But I am not sure if sass() overwrites anything set in the config from the flavor since I have limited knowledge regarding webpack-blocks