AngularJS + webpack 4 example project
An AngularJS + webpack seed project, supporting ES2015+ syntax through Babel compiler; ESLint and stylelint will assist you writing beautiful code.
Updated version inspired by top-solution/angularjs-webpack-seed
It comes with preconfigured
- UI Router 1.0.x
- Sass 3 (using SCSS syntax)
Supported browsers (in browserlist format) are:
last 2 versions
ie >= 10
Required:
- Node.js with
npm
, the current LTS version is an ideal starting point
Fork or download the project then install dependencies
$ npm install
$ npm run dev
The project will be available at http://localhost:8000/.
$ npm run build
If you need to inject different environment variables, for example to use a different API url in a certain environment, just add them to the proper env file (for example if 'NODE_ENV=dev' the env file is env/dev.sh
).
Through every file inside src the placeholders will be replaced with actual values during the build.
For example if you add APP_NAME=Angularjs seed
to the env/dev.sh
every instance of %APP_NAME%
will be replaced with Angularjs seed
Note that for every change in the env files you'll have to restart the webpack server if it's running.
- Internet Explorer 10 is not supported in development mode
- Use npm version