Comments (3)
It's working for me I've modified your script quite a bit but essentially I'm doing this for it to work.
I reference my images as:
scss
.logo {
background-image: url('/assets/images/logo.png');
}
My make script does this:
webpack.make.js
// Copy assets from the public folder
// Reference: https://github.com/kevlened/copy-webpack-plugin
new CopyWebpackPlugin( [ {
from: config.output.assets_src,
to: config.output.assets_dst
} ] )
// Assets directories are defined as
assets_src: `${ __dirname }/src/assets/images`,
assets_dst: `${ __dirname }/assets/images`,
from angularjs-webpack.
I figured this out but never updated the issue.
the css-loader
(not sure about scss to be honest) does a require()
with the images, so the path needs to be relative to the css file.
I am going to make some changes and remove the need of CopyWebpackPlugin (hopefully) with the html-loader so css and html images will have the same behavior.
from angularjs-webpack.
OK! cool!
from angularjs-webpack.
Related Issues (20)
- npm start HOT 4
- Exclude AngularJS library from bundle
- browserslistrc is being ignored
- sourcemap is not generated
- Conflicting browserlist setup HOT 1
- No cache bust on CSS?
- Problems with deploying to S3 HOT 7
- Typo in webpack.config.js comment HOT 2
- custom fonts are not loaded HOT 1
- Can't load ressources when "npm run build" HOT 4
- css in the picture packing problem HOT 1
- extract-text-webpack-plugin unstable HOT 1
- Integrate another starter in your starter HOT 10
- Scoped CSS HOT 1
- The description of the repo is misleading
- When to use `templateUrl` vs `template: require('./app.html')`? HOT 1
- nothing show after first fresh build HOT 3
- What is the best practice and right way to use this template? HOT 3
- Dependecy deprecated HOT 3
- ngMock function in global scope (module, inject, ...) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angularjs-webpack.