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

Extract assets to different directory #94

Merged
merged 1 commit into from
Apr 22, 2016
Merged

Extract assets to different directory #94

merged 1 commit into from
Apr 22, 2016

Conversation

pespantelis
Copy link
Contributor

Imagine that you have these static files:

├── static/
│   ├── css
│   │   ├── style1.css
│   │   ├── style2.css
│   │   ├── style3.css
│   ├── img
│   │   ├── image1.png
│   │   ├── image2.png
│   │   ├── image3.png
│   ├── js
│   │   ├── script1.js
│   │   ├── script2.js
│   │   ├── script3.js

After the build, we get these:

├── dist/
│   ├── static/
│   │   ├── css
│   │   │   ├── style1.css
│   │   │   ├── style2.css
│   │   │   ├── style3.css
│   │   ├── img
│   │   │   ├── image1.png
│   │   │   ├── image2.png
│   │   │   ├── image3.png
│   │   ├── js
│   │   │   ├── script1.js
│   │   │   ├── script2.js
│   │   │   ├── script3.js
│   │   ├── app.css
│   │   ├── app.js
│   │   ├── logo.png
│   ├── index.html

If we extract the assets to different directories, we get these:

├── dist/
│   ├── static/
│   │   ├── css
│   │   │   ├── app.css
│   │   │   ├── style1.css
│   │   │   ├── style2.css
│   │   │   ├── style3.css
│   │   ├── img
│   │   │   ├── image1.png
│   │   │   ├── image2.png
│   │   │   ├── image3.png
│   │   │   ├── logo.png
│   │   ├── js
│   │   │   ├── app.js
│   │   │   ├── script1.js
│   │   │   ├── script2.js
│   │   │   ├── script3.js
│   ├── index.html

@@ -65,7 +65,7 @@ module.exports = {
loader: 'url',
query: {
limit: 10000,
name: utils.assetsPath('[name].[hash:7].[ext]')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this loader also handles fonts

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh you are right, I missed that. Maybe we can split into 2 loaders?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah that's what I would do

@yyx990803 yyx990803 merged commit 0fe60e2 into vuejs-templates:dist Apr 22, 2016
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

Successfully merging this pull request may close these issues.

2 participants