mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-17 06:52:27 +01:00
WIP: correct angualrJS templates path for production build
see: https://github.com/WearyMonkey/ngtemplate-loader
This commit is contained in:
parent
585f01b671
commit
875c7a6df8
@ -21,14 +21,14 @@ angular.module('application.router', ['ui.router'])
|
||||
abstract: true,
|
||||
views: {
|
||||
header: {
|
||||
templateUrl: '../../templates/shared/header.html.erb'
|
||||
templateUrl: '/shared/header.html.erb'
|
||||
},
|
||||
leftnav: {
|
||||
templateUrl: '../../templates/shared/leftnav.html',
|
||||
templateUrl: '/shared/leftnav.html',
|
||||
controller: 'MainNavController'
|
||||
},
|
||||
cookies: {
|
||||
templateUrl: '../../templates/shared/cookies.html',
|
||||
templateUrl: '/shared/cookies.html',
|
||||
controller: 'CookiesController'
|
||||
},
|
||||
main: {}
|
||||
|
@ -2,4 +2,14 @@ process.env.NODE_ENV = process.env.NODE_ENV || 'development';
|
||||
|
||||
const environment = require('./environment');
|
||||
|
||||
const html = environment.loaders.get('html');
|
||||
html.use[0].options.prefix = '../../templates';
|
||||
environment.loaders.delete('html');
|
||||
environment.loaders.append('html', html);
|
||||
|
||||
const htmlErb = environment.loaders.get('html-erb');
|
||||
htmlErb.use[0].options.prefix = '../../templates';
|
||||
environment.loaders.delete('html-erb');
|
||||
environment.loaders.prepend('html-erb', htmlErb);
|
||||
|
||||
module.exports = environment.toWebpackConfig();
|
||||
|
@ -32,6 +32,7 @@ environment.loaders.prepend('js', js);
|
||||
environment.loaders.append('html', html);
|
||||
environment.loaders.append('sass', sass);
|
||||
environment.loaders.append('uiTour', uiTour);
|
||||
environment.loaders.insert('foo', jsErb, { alter: 'bar' });
|
||||
|
||||
environment.splitChunks();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user