Hello, could you pls explain smth for me?
I have a stylus mixin in mixins.styl file and it's the reason why my custom webpack bundle throw a parse error
I don't really understand what's the problem because my another bundle (on gulp though) doesn't have such problem
Sorry for the late reply. Maybe you can join those resources content with \n, or ensure each resource files have \n character at last.
If not, files concatenation will probably cause a parse error.
Hello, could you pls explain smth for me? I have a stylus mixin in mixins.styl file and it's the reason why my custom webpack bundle throw a parse error I don't really understand what's the problem because my another bundle (on gulp though) doesn't have such problem
Here's the mixin
`
`
Here's how it made in config `
{ loader: 'style-resources-loader', options: { patterns: [ path.resolve(dirname, './src/styles/variables.styl'), path.resolve(dirname, './src/styles/mixins.styl'), path.resolve(dirname, './src/styles/optimize.styl'), path.resolve(dirname, './src/styles/global.styl'), path.resolve(dirname, './src/views/header/header.styl'), path.resolve(dirname, './src/views/footer/footer.styl'), path.resolve(__dirname, './src/styles/libs/*.styl'), ], injector: (source, resources) => { const combineAll = type => resources .filter(({ file }) => file.includes(type)) .map(({ content }) => content) .join('');
`