{"id":19020275,"url":"https://github.com/trailsjs/trailpack-webpack","last_synced_at":"2025-04-23T05:45:33.359Z","repository":{"id":69884618,"uuid":"46914944","full_name":"trailsjs/trailpack-webpack","owner":"trailsjs","description":":package: Webpack Trailpack. ","archived":false,"fork":false,"pushed_at":"2017-01-14T19:13:48.000Z","size":29,"stargazers_count":11,"open_issues_count":5,"forks_count":1,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-23T05:45:26.560Z","etag":null,"topics":["trailpack","trails","webpack"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trailsjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-11-26T08:52:25.000Z","updated_at":"2016-11-12T11:56:07.000Z","dependencies_parsed_at":"2023-02-28T18:46:18.670Z","dependency_job_id":null,"html_url":"https://github.com/trailsjs/trailpack-webpack","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailsjs%2Ftrailpack-webpack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailsjs%2Ftrailpack-webpack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailsjs%2Ftrailpack-webpack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailsjs%2Ftrailpack-webpack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trailsjs","download_url":"https://codeload.github.com/trailsjs/trailpack-webpack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250379784,"owners_count":21420841,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["trailpack","trails","webpack"],"created_at":"2024-11-08T20:16:26.814Z","updated_at":"2025-04-23T05:45:33.354Z","avatar_url":"https://github.com/trailsjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# trailpack-webpack\n\n[![Gitter][gitter-image]][gitter-url]\n[![NPM version][npm-image]][npm-url]\n[![Linux + OSX Build Status][ci-image]][ci-url]\n[![Windows Build Status][appveyor-image]][appveyor-url]\n[![Code Climate][codeclimate-image]][codeclimate-url]\n[![Follow @trailsjs on Twitter][twitter-image]][twitter-url]\n\nWebpack asset pipeline trailpack for Trails.\n\n## 1. Install\n```sh\n$ npm install trailpack-webpack --save\n```\n\n## 2. Configure\n\n### a. Set your environment.\n\nBy default, Trails ([and express](http://stackoverflow.com/a/16979503/291180)) sets `NODE_ENV=development`.\nIn this setting, webpack will watch for changes in the directories you specify in your `config/webpack.js`.\n\n\n| `NODE_ENV` | webpack mode | description |\n|:---|:---|:---|\n| `development` | [`webpack.watch()`](https://webpack.github.io/docs/configuration.html#watch) | Rebuilds on file changes during runtime |\n| `staging` or `production` | `webpack.run()` | Build bundle once on load. |\n\n### b. Configure Webpack\n\nThis trailpack includes basic [Webpack Configuration](https://webpack.github.io/docs/configuration.html).\nBelow is a more complete example of using webpack to compile a [React.js](https://facebook.github.io/react/) application located in `assets/js/`.\n\n```js\n// config/webpack.js\nmodule.exports = {\n  entry: [\n    './client/js/app.js'\n  ],\n  output: {\n    path: './public',\n    filename: 'app.js',\n    publicPath: ''\n  },\n  plugins: [\n    new HtmlWebpackPlugin({\n      title: 'Trails Application'\n    }),\n    new webpack.HotModuleReplacementPlugin(),\n    new webpack.NoErrorsPlugin()\n  ],\n  module: {\n    loaders: [{\n      test: /\\.js$/,\n      loader: 'babel',\n      exclude: /node_modules/,\n      query: {\n        presets: [ 'react', 'es2015', 'stage-0' ]\n      }\n    }, {\n      test: /\\.css$/,\n      loader: 'style-loader!css-loader'\n    }, {\n      test: /\\.(ttf|otf|eot|svg|woff(2)?)(\\?[a-z0-9]+)?$/,\n      loader: 'file-loader?name=fonts/[name].[ext]'\n    }, {\n      test: /\\.(png|jpg)$/,\n      loader: require.resolve('url-loader')\n    }]\n  }\n}\n```\n\n## 3. Start!\n\n```sh\n$ npm start\n```\n\n## Contributing\nWe love contributions! Please check out our [Contributor's Guide](https://github.com/trailsjs/trails/blob/master/.github/CONTRIBUTING.md) for more\ninformation on how our projects are organized and how to get started.\n\n## License\n[MIT](https://github.com/trailsjs/trails/blob/master/LICENSE)\n\n\u003cimg src=\"http://i.imgur.com/dCjNisP.png\"\u003e\n\n[trails-image]: http://i.imgur.com/zfT2NEv.png\n[trails-url]: http://trailsjs.io\n[npm-image]: https://img.shields.io/npm/v/trailpack-webpack.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/trailpack-webpack\n[ci-image]: https://img.shields.io/travis/trailsjs/trailpack-webpack.svg?style=flat-square\u0026label=Linux%20/%20OSX\n[ci-url]: https://travis-ci.org/trailsjs/trailpack-webpack\n[appveyor-image]: https://img.shields.io/appveyor/ci/trailsjs/trailpack-webpack/master.svg?style=flat-square\u0026label=Windows\n[appveyor-url]: https://ci.appveyor.com/project/trailsjs/trailpack-webpack\n[codeclimate-image]: https://img.shields.io/codeclimate/github/trailsjs/trailpack-webpack.svg?style=flat-square\n[codeclimate-url]: https://codeclimate.com/github/trailsjs/trailpack-webpack\n[gitter-image]: http://img.shields.io/badge/+%20GITTER-JOIN%20CHAT%20%E2%86%92-1DCE73.svg?style=flat-square\n[gitter-url]: https://gitter.im/trailsjs/trails\n[twitter-image]: https://img.shields.io/twitter/follow/trailsjs.svg?style=social\n[twitter-url]: https://twitter.com/trailsjs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrailsjs%2Ftrailpack-webpack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrailsjs%2Ftrailpack-webpack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrailsjs%2Ftrailpack-webpack/lists"}