Comments (8)
@zachgrayio how did you get the component html templates to load in dist? when opening the index.html I receive Failed to load resouce: the server responded with a status 404 (Not Found) app/seed-app.html
from angular2-seed.
+1 Preferably including minification
from angular2-seed.
There's (beta.1-beta.9) currently a problem with minification. I can see if there is a setup that makes sense without introducing complexity
from angular2-seed.
ok do mangle: false to avoid minification issue now. Good solution need to find soon
from angular2-seed.
@gdi2290 Okay.. I'm actually glad to hear there's still a minification issue in beta 9, since I have been struggling with it. It's not only me, then. I just rely on gzipping for now. No minification at all, but looking forward to reducing the bundle size!
from angular2-seed.
This is actually pretty easy to do on your own, assuming you've got this in your webpack config:
output: { path: path.join(__dirname, 'dist') },
you can just modify/add the build task in package.json
like so to include your html:
"build:dev": "./node_modules/.bin/webpack --inline --colors --progress --display-error-details --display-cached && cp src/index.dev.html dist/index.html",
, and then create your dist folder by running npm run build:dev
etc.
And if you've added sass/css plugins to webpack, just make sure you include the css bundle in your html file, and then you can import the sass/css files as needed in your components, via import 'stylesheets/my_stylez'
from angular2-seed.
And as far as minification goes, so far it seems like webpack.optimize.UglifyJsPlugin()
with minimize=true seems to be working out pretty well on ng2 beta.13, so that's worth a shot if you're adding a build task.
from angular2-seed.
Duplicate of #17. I think it will make sense to do this only once offline compilation works.
from angular2-seed.
Related Issues (20)
- Why is twitter bootstrap in the package?
- Build production HOT 2
- can not register ngx-uploader
- error when i start npm HOT 4
- Nothing happens after npm start / only Loading is displayed
- Err: unable to start
- Words of appreciation
- Reducing the size of the generated file for Prod deployments HOT 1
- How to import ng2-bootstrap with webpack HOT 1
- how to integrate my site on ligne
- npm install Error - shasum check failed
- Import node module HOT 1
- unable to start project on my system HOT 2
- Inactive/Dead? HOT 3
- Problem Install npm ; "npm install" HOT 1
- Failed at the [email protected] start script
- Include sass
- Angular 5 will be supported?
- Cannot read property 'config' of null HOT 1
- problem with lazy loading
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular2-seed.