Code Monkey home page Code Monkey logo

Comments (8)

piotrromanowski avatar piotrromanowski commented on May 22, 2024 4

@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.

skovmand avatar skovmand commented on May 22, 2024

+1 Preferably including minification

from angular2-seed.

PatrickJS avatar PatrickJS commented on May 22, 2024

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.

deepakgd avatar deepakgd commented on May 22, 2024

ok do mangle: false to avoid minification issue now. Good solution need to find soon

from angular2-seed.

skovmand avatar skovmand commented on May 22, 2024

@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.

zachgrayio avatar zachgrayio commented on May 22, 2024

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.

zachgrayio avatar zachgrayio commented on May 22, 2024

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.

pkozlowski-opensource avatar pkozlowski-opensource commented on May 22, 2024

Duplicate of #17. I think it will make sense to do this only once offline compilation works.

from angular2-seed.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.