{"action":"created","issue":{"url":"https://api.github.com/repos/Wildhoney/Legofy/issues/12","repository_url":"https://api.github.com/repos/Wildhoney/Legofy","labels_url":"https://api.github.com/repos/Wildhoney/Legofy/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/Wildhoney/Legofy/issues/12/comments","events_url":"https://api.github.com/repos/Wildhoney/Legofy/issues/12/events","html_url":"https://github.com/Wildhoney/Legofy/issues/12","id":133000412,"number":12,"title":"Issue during import using webpack+babel","user":{"login":"ByJC","id":11909355,"avatar_url":"https://avatars.githubusercontent.com/u/11909355?v=3","gravatar_id":"","url":"https://api.github.com/users/ByJC","html_url":"https://github.com/ByJC","followers_url":"https://api.github.com/users/ByJC/followers","following_url":"https://api.github.com/users/ByJC/following{/other_user}","gists_url":"https://api.github.com/users/ByJC/gists{/gist_id}","starred_url":"https://api.github.com/users/ByJC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ByJC/subscriptions","organizations_url":"https://api.github.com/users/ByJC/orgs","repos_url":"https://api.github.com/users/ByJC/repos","events_url":"https://api.github.com/users/ByJC/events{/privacy}","received_events_url":"https://api.github.com/users/ByJC/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-02-11T15:17:22Z","updated_at":"2016-02-12T15:11:31Z","closed_at":null,"body":"Hi @Wildhoney, \r\n\r\nI encounter an issue using your legofy.\r\n\r\nI tried to import legofy using \r\n```js\r\nimport {transform} from 'legofy'\r\n```\r\n\r\ninto my project which currently use Webpack and babel and I get this error : \r\n\r\n```\r\nERROR in ./~/legofy/src/core.js\r\nModule parse failed: /Users/byjc/Workspace/test/angular-es6-webpack-boilerplate/node_modules/legofy/src/core.js Line 17: Unexpected token\r\nYou may need an appropriate loader to handle this file type.\r\n|  * @type {Object}\r\n|  */\r\n| export const DEFAULTS = {\r\n|     FACTOR: 0.05,\r\n|     BLEND_MODE: 'overlay'\r\n @ ./lib/components/legofy/legofy.controller.js 7:14-31\r\n```\r\n\r\nI used Babel : \r\n```js\r\n    \"babel-core\": \"~6.5.1\",\r\n    \"babel-loader\": \"~6.2.2\",\r\n    \"babel-preset-es2015\": \"~6.5.0\",\r\n```\r\n\r\nand this is my conf webpack : \r\n```js\r\nvar path = require('path'),\r\n    webpack = require(\"webpack\"),\r\n    libPath = path.join(__dirname, 'lib'),\r\n    wwwPath = path.join(__dirname, 'www'),\r\n    pkg = require('./package.json'),\r\n    HtmlWebpackPlugin = require('html-webpack-plugin');\r\n\r\nmodule.exports = {\r\n    entry: path.join(libPath, 'index.js'),\r\n    output: {\r\n        path: path.join(wwwPath),\r\n        filename: 'bundle-[hash:6].js'\r\n    },\r\n    babel: {\r\n        presets: ['es2015']\r\n    },\r\n    module: {\r\n        loaders: [{\r\n            test: /\\.html$/,\r\n            loader: 'file?name=templates/[name]-[hash:6].html'\r\n        }, {\r\n            test: /\\.(png|jpg)$/,\r\n            loader: 'file?name=img/[name].[ext]' // inline base64 URLs for <=10kb images, direct URLs for the rest\r\n        }, {\r\n            test: /\\.css$/,\r\n            loader: \"style!css\"\r\n        }, {\r\n            test: /\\.scss$/,\r\n            loader: \"style!css!autoprefixer!sass\"\r\n        }, {\r\n            test: /\\.js$/,\r\n            exclude: /(node_modules)/,\r\n            loader: \"ng-annotate?add=true!babel\"\r\n        }, {\r\n            test: [/fontawesome-webfont\\.svg/, /fontawesome-webfont\\.eot/, /fontawesome-webfont\\.ttf/, /fontawesome-webfont\\.woff/, /fontawesome-webfont\\.woff2/],\r\n            loader: 'file?name=fonts/[name].[ext]'\r\n        }]\r\n    },\r\n    plugins: [\r\n        new HtmlWebpackPlugin({\r\n            filename: 'index.html',\r\n            pkg: pkg,\r\n            template: path.join(libPath, 'index.html')\r\n        }),\r\n        new webpack.optimize.OccurenceOrderPlugin(),\r\n        new webpack.optimize.DedupePlugin(),\r\n    ]\r\n};\r\n```\r\n\r\nI'm aware this is not directly about your component but I can't find a way to load it properly and don't know what kind of loader i should use for the core.js\r\n\r\nThanks,"},"comment":{"url":"https://api.github.com/repos/Wildhoney/Legofy/issues/comments/183367916","html_url":"https://github.com/Wildhoney/Legofy/issues/12#issuecomment-183367916","issue_url":"https://api.github.com/repos/Wildhoney/Legofy/issues/12","id":183367916,"user":{"login":"ByJC","id":11909355,"avatar_url":"https://avatars.githubusercontent.com/u/11909355?v=3","gravatar_id":"","url":"https://api.github.com/users/ByJC","html_url":"https://github.com/ByJC","followers_url":"https://api.github.com/users/ByJC/followers","following_url":"https://api.github.com/users/ByJC/following{/other_user}","gists_url":"https://api.github.com/users/ByJC/gists{/gist_id}","starred_url":"https://api.github.com/users/ByJC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ByJC/subscriptions","organizations_url":"https://api.github.com/users/ByJC/orgs","repos_url":"https://api.github.com/users/ByJC/repos","events_url":"https://api.github.com/users/ByJC/events{/privacy}","received_events_url":"https://api.github.com/users/ByJC/received_events","type":"User","site_admin":false},"created_at":"2016-02-12T15:11:31Z","updated_at":"2016-02-12T15:11:31Z","body":"Last question : \r\nWhen i Legofy my images, they change to one single size : \r\n[!](http://s27.postimg.org/dz06vhog3/Screen_Shot_2016_02_12_at_4_07_26_PM.png)\r\n\r\nI just made a transform and nothing else, no styles or anything.\r\n"}}