Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module '" + loader.path + "' is not a loader (must have normal or pitch function) #4

Closed
KeithWilliamsGMIT opened this issue Mar 10, 2017 · 1 comment

Comments

@KeithWilliamsGMIT
Copy link
Owner

After following the steps on how to use Bootstrap 4 and Sass with Angular 2, outlined here, I got the following error when trying to compile the application.

throw new Error("Module '" + loader.path + "' is not a loader (must have normal or pitch function)");
@KeithWilliamsGMIT
Copy link
Owner Author

I found the solution here. In this case I had to change

{
	test: /\.(woff2?|ttf|eot|svg)$/,
	loader: 'url?limit=10000'
}

to

{
	test: /\.(woff2?|ttf|eot|svg)$/,
	loader: 'url-loader?limit=10000'
}

in the webpack.common.js file. Notice the change from url to url-loader. This is necessary because, since Webpack 2, the automatic -loader module name extension has been removed meaning it is no longer possible to omit the -loader extension when referencing loaders. More information on this can be found here.

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

No branches or pull requests

1 participant