[GH-ISSUE #297] Problem on build dist with webpack #186

Closed
opened 2026-03-03 14:35:15 +03:00 by kerem · 2 comments
Owner

Originally created by @Chklang on GitHub (Sep 14, 2016).
Original GitHub issue: https://github.com/lipis/flag-icons/issues/297

Hi

I've used the yeoman generator fountainjs, and this generator has configured for me the excellentissime webpack. But if i use it in dist mode with flag-icon-css i have this bug :

ERROR in multi vendor
Module not found: Error: Can't resolve 'flag-icon-css' in '[...]\client'
@ multi vendor

And i've found why : flag-icon-css not implement the "main" property into package.json. So if i add :

"main":"index.js"

into package.json and i create a file index.js with this content :

'use strict';
var icons = require('./css/flag-icon.min.css');
module.exports = {
    icons: icons
};

So build is OK.

Can you add it in your future version?

Regards.

Originally created by @Chklang on GitHub (Sep 14, 2016). Original GitHub issue: https://github.com/lipis/flag-icons/issues/297 Hi I've used the yeoman generator fountainjs, and this generator has configured for me the excellentissime webpack. But if i use it in dist mode with flag-icon-css i have this bug : > ERROR in multi vendor > Module not found: Error: Can't resolve 'flag-icon-css' in '[...]\client' > @ multi vendor And i've found why : flag-icon-css not implement the "main" property into package.json. So if i add : `"main":"index.js"` into package.json and i create a file index.js with this content : ``` 'use strict'; var icons = require('./css/flag-icon.min.css'); module.exports = { icons: icons }; ``` So build is OK. Can you add it in your future version? Regards.
kerem closed this issue 2026-03-03 14:35:16 +03:00
Author
Owner

@lipis commented on GitHub (Sep 18, 2016):

Haven't played with Webpack but can we add the stylesheets files like in Bower? Because this project is not a JS project to add an index.js

<!-- gh-comment-id:247837710 --> @lipis commented on GitHub (Sep 18, 2016): Haven't played with Webpack but can we add the [stylesheets files](https://github.com/lipis/flag-icon-css/blob/master/bower.json#L3-L6) like in Bower? Because this project is not a JS project to add an `index.js`
Author
Owner

@Chklang commented on GitHub (Sep 23, 2016):

The index.js is only to specify files to import on the application. So it's not a JS file used for execution but only for compilation. After i don't know if it's possible to import only css, i've seen the project bootstrap-css to understand it : https://github.com/StevenIseki/bootstrap-css/blob/master/index.js .

<!-- gh-comment-id:249124463 --> @Chklang commented on GitHub (Sep 23, 2016): The index.js is only to specify files to import on the application. So it's not a JS file used for execution but only for compilation. After i don't know if it's possible to import only css, i've seen the project bootstrap-css to understand it : https://github.com/StevenIseki/bootstrap-css/blob/master/index.js .
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/flag-icons#186
No description provided.