PatrickJS on npm_and_yarn
PatrickJS on master
chore(deps-dev): bump node-sass… (compare)
dependabot[bot] on npm_and_yarn
chore(deps-dev): bump node-sass… (compare)
PatrickJS on master
Update README.md (compare)
@adityaparab problem occurs after font loading
var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
devtool: 'sourcemap',
entry: {},
module: {
loaders: [
{ test: /.js$/, exclude: [/app\/lib/, /node_modules/], loader: 'ng-annotate!babel' },
{ test: /.(png)$/, loader: 'url-loader?limit=100000' },
{ test: /.woff(2)?(\?v=\d+.\d+.\d+)?$/, loader: "url?limit=10000&mimetype=application/font-woff" },
{ test: /.ttf(\?v=\d+.\d+.\d+)?$/, loader: "url?limit=10000&mimetype=application/octet-stream" },
{ test: /.eot(\?v=\d+.\d+.\d+)?$/, loader: "file" },
{ test: /.svg(\?v=\d+.\d+.\d+)?$/, loader: "url?limit=10000&mimetype=image/svg+xml" },
{ test: /.html$/, loader: 'raw' },
{ test: /.(sass|scss)$/, loader: 'style!css!sass' },
{ test: /.css$/, loader: 'style!css' }
]
},
plugins: [
// Injects bundles in your index.html instead of wiring all manually.
// It also adds hash to all injected assets so we don't have problems
// with cache purging during deployment.
new HtmlWebpackPlugin({
template: 'client/index.html',
inject: 'body',
hash: true
}),
// Automatically move all modules defined outside of application directory to vendor bundle.
// If you are using more complicated project structure, consider to specify common chunks manually.
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks: function (module, count) {
return module.resource && module.resource.indexOf(path.resolve(__dirname, 'client')) === -1;
}
})
]
};
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks: function (module, count) {
//console.log(module.rawRequest);
console.log(module.resource);
return module.resource && module.resource.indexOf(path.resolve(__dirname, 'client')) === -1;
}
})
If you look at the logs of that shows all kinda es6 and 7 stuff being webpacked and the bundles seem comparatively huge compared to vanilla angular stuff.
If you look at the logs of that shows all kinda es6 and 7 stuff being webpacked and the bundles seem comparatively huge compared to vanilla angular stuff.new webpack.optimize.CommonsChunkPlugin({ name: 'vendor', minChunks: function (module, count) { //console.log(module.rawRequest); console.log(module.resource); return module.resource && module.resource.indexOf(path.resolve(__dirname, 'client')) === -1; } })
Hello Friends!
I am looking for some help. I am trying to import rx-angular
into my application by add the following in home.js:
import angular from 'angular';
import homeComponent from './home.component';
import rx from 'rx-angular';
let homeModule = angular.module('home', [
'firebase',
rx
])
.component('home', homeComponent)
.name;
export default homeModule;
I am however getting this error from webpack, do ya'll any idea of what I am doing worng. Thanks for the help.
Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to:
Error: [$injector:modulerr] Failed to instantiate module app.components due to:
Error: [$injector:modulerr] Failed to instantiate module home due to:
Error: [$injector:modulerr] Failed to instantiate module {"internals":{},"config":{"longStackSupport":false,"useNativeEvents":false},"helpers":{},"doneEnumerator":{"done":true},"ReactiveTest":{"created":100,"subscribed":200,"disposed":1000}} due to:
Error: [ng:areq] Argument 'module' is not a function, got Object
Hi guys. My problem is that ui-router events $stateChangeStart and $stateChangeSuccess doesn't work in this template. I put this code
$rootScope.$on('$stateChangeStart', function(){
console.log('start');
})
$rootScope.$on('$stateChangeSuccess', function(){
console.log('success');
})
at run function in app.js file. When i change the state nothing happend.
Hi @arturoromeroslc
Hello Friends!
I am looking for some help. I am trying to import rx-angular
into my application by add the following in home.js:
import angular from 'angular';
import homeComponent from './home.component';
import rx from 'rx-angular';
let homeModule = angular.module('home', [
'firebase',
rx
])
.component('home', homeComponent)
.name;
export default homeModule;
I am however getting this error from webpack, do ya'll any idea of what I am doing worng. Thanks for the help.
Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to:
Error: [$injector:modulerr] Failed to instantiate module app.components due to:
Error: [$injector:modulerr] Failed to instantiate module home due to:
Error: [$injector:modulerr] Failed to instantiate module {"internals":{},"config":{"longStackSupport":false,"useNativeEvents":false},"helpers":{},"doneEnumerator":{"done":true},"ReactiveTest":{"created":100,"subscribed":200,"disposed":1000}} due to:
Error: [ng:areq] Argument 'module' is not a function, got Object
Did you find the solution ? i get exactly the same problem :/ . Thank you
let homeModule = angular.module('home', [
'firebase',
'rx'
])
angular.module('assessments', [
uiRouter,
Common,
Components
])
.config(($locationProvider) => {
"ngInject";
// @see: https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions
// #how-to-configure-your-server-to-work-with-html5mode
$locationProvider.html5Mode(true).hashPrefix('!');
})
import angular from 'angular';
import uiRouter from 'angular-ui-router';
import HomeComponent from './home.component';
import HomeConfig from './home.config';
let homeModule = angular.module('home', [
uiRouter
])
.config(HomeConfig)
.component('home', HomeComponent)
.name;
export default homeModule;
let homeConfig = function($urlRouterProvider, $stateProvider) {
"ngInject";
$urlRouterProvider.otherwise('/');
$stateProvider
.state('home', {
url: '/',
component: 'home'
});
};
export default homeConfig;
.config(($stateProvider) => {
"ngInject";
$stateProvider
.state('welcome', {
url: '/',
component: 'welcome',
resolve: {
'currentAuth': function (Auth) {
"ngInject";
return Auth.$waitForSignIn();
}
}
});
})
class WelcomeController {
constructor(currentAuth) {
"ngInject";
console.log(currentAuth);
this.name = 'welcome';
}
}