mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
ADF Theme Dev/Prod mode (#2236)
* Add undescore * Move the scss logic from webpack common to dev/prod Rollback the change about the color.scss name
This commit is contained in:
parent
c168a88775
commit
17e6b5eb42
@ -63,19 +63,6 @@ module.exports = {
|
|||||||
include: [helpers.root('app'), helpers.root('../ng2-components')],
|
include: [helpers.root('app'), helpers.root('../ng2-components')],
|
||||||
loader: 'raw-loader'
|
loader: 'raw-loader'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
test: /\.scss$/,
|
|
||||||
use: [{
|
|
||||||
loader: "to-string-loader"
|
|
||||||
}, {
|
|
||||||
loader: "raw-loader"
|
|
||||||
}, {
|
|
||||||
loader: "sass-loader",
|
|
||||||
options: {
|
|
||||||
includePaths: [path.resolve(__dirname, '../../ng2-components/ng2-alfresco-core/styles')]
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
|
test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
|
||||||
loader: 'file-loader?name=assets/[name].[hash].[ext]'
|
loader: 'file-loader?name=assets/[name].[hash].[ext]'
|
||||||
|
@ -45,7 +45,20 @@ module.exports = webpackMerge(commonConfig, {
|
|||||||
'happypack/loader?id=ts','angular2-template-loader'
|
'happypack/loader?id=ts','angular2-template-loader'
|
||||||
],
|
],
|
||||||
exclude: [/node_modules/, /public/, /resources/, /dist/]
|
exclude: [/node_modules/, /public/, /resources/, /dist/]
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
test: /\.scss$/,
|
||||||
|
use: [{
|
||||||
|
loader: "to-string-loader"
|
||||||
|
}, {
|
||||||
|
loader: "raw-loader"
|
||||||
|
}, {
|
||||||
|
loader: "sass-loader",
|
||||||
|
options: {
|
||||||
|
includePaths: [path.resolve(__dirname, '../../ng2-components/ng2-alfresco-core/styles')]
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ const helpers = require('./helpers');
|
|||||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||||
var HappyPack = require('happypack');
|
var HappyPack = require('happypack');
|
||||||
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
||||||
|
const path = require('path');
|
||||||
const ENV = process.env.NODE_ENV = process.env.ENV = 'production';
|
const ENV = process.env.NODE_ENV = process.env.ENV = 'production';
|
||||||
|
|
||||||
const alfrescoLibs = [
|
const alfrescoLibs = [
|
||||||
@ -50,7 +50,20 @@ module.exports = webpackMerge(commonConfig, {
|
|||||||
include: [helpers.root('app'), helpers.root('../ng2-components')],
|
include: [helpers.root('app'), helpers.root('../ng2-components')],
|
||||||
use: ['happypack/loader?id=ts', 'angular2-template-loader'],
|
use: ['happypack/loader?id=ts', 'angular2-template-loader'],
|
||||||
exclude: [/node_modules/, /public/, /resources/, /dist/]
|
exclude: [/node_modules/, /public/, /resources/, /dist/]
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
test: /\.scss$/,
|
||||||
|
use: [{
|
||||||
|
loader: "to-string-loader"
|
||||||
|
}, {
|
||||||
|
loader: "raw-loader"
|
||||||
|
}, {
|
||||||
|
loader: "sass-loader",
|
||||||
|
options: {
|
||||||
|
includePaths: [path.resolve(__dirname, helpers.root('node_modules') + '/ng2-alfresco-core/styles')]
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -82,6 +95,13 @@ module.exports = webpackMerge(commonConfig, {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
]),
|
]),
|
||||||
|
new CopyWebpackPlugin([
|
||||||
|
{
|
||||||
|
context: `node_modules/ng2-alfresco-core/prebuilt-themes/`,
|
||||||
|
from: '**/*.css',
|
||||||
|
to: 'prebuilt-themes'
|
||||||
|
}
|
||||||
|
]),
|
||||||
new webpack.NoEmitOnErrorsPlugin(),
|
new webpack.NoEmitOnErrorsPlugin(),
|
||||||
new webpack.optimize.UglifyJsPlugin({ // https://github.com/angular/angular/issues/10618
|
new webpack.optimize.UglifyJsPlugin({ // https://github.com/angular/angular/issues/10618
|
||||||
mangle: {
|
mangle: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user