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

Remove sass url loader, move url resolving to PostCSS #1909

Merged
merged 1 commit into from Aug 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 1 addition & 9 deletions src/assets/SASSAsset.js
Expand Up @@ -40,13 +40,6 @@ class SASSAsset extends Asset {
? opts.indentedSyntax
: type === 'sass';

opts.functions = Object.assign({}, opts.functions, {
'url($url)': url => {
let filename = this.addURLDependency(url.getValue());
return new sass.types.String(`url(${JSON.stringify(filename)})`);
}
});

opts.importer = opts.importer || [];
opts.importer = Array.isArray(opts.importer)
? opts.importer
Expand Down Expand Up @@ -83,8 +76,7 @@ class SASSAsset extends Asset {
return [
{
type: 'css',
value: this.ast ? this.ast.css.toString() : '',
hasDependencies: false
value: this.ast ? this.ast.css.toString() : ''
}
];
}
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions test/integration/scss-url/index.scss
Expand Up @@ -6,3 +6,7 @@
.index {
background: url("http://google.com");
}

.something {
background: url(./image.jpeg);
}
5 changes: 5 additions & 0 deletions test/sass.js
Expand Up @@ -116,6 +116,11 @@ describe('sass', function() {
name: 'index.js',
assets: ['index.js', 'index.scss'],
childBundles: [
{
type: 'jpeg',
assets: ['image.jpeg'],
childBundles: []
},
{
type: 'map'
},
Expand Down