开发jquery多页应用,引入sass-resources-loader后报

Make sure 'options.resources' is String or Array of Strings.

查找后发现是由于引入的路径错误造成的,
最开始引入的时候是这样的

                'sass-loader',
			{
	        	loader: 'sass-resources-loader',
	        	options: {
		            // Provide path to the file with resources
		            resources: '../src/assets/css/vars.scss'
	        	},
	        },	    

由于写的是相对路径,可能解析不了还是什么原因,然后试了下绝对路径

                'sass-loader',
			{
	        	loader: 'sass-resources-loader',
	        	options: {
		            // Provide path to the file with resources
		            resources: path.resolve(__dirname,'../src/assets/css/vars.scss')
	        	},
	        },	    

bingo,解决了。

相关文章:

  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
  • 2022-12-23
  • 2021-10-14
  • 2022-12-23
  • 2021-10-20
  • 2022-12-23
猜你喜欢
  • 2021-03-29
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案