mirror of
https://github.com/Redocly/redoc.git
synced 2025-01-31 10:04:08 +03:00
build: fix build with ng4
This commit is contained in:
parent
fb629fa7d7
commit
631dfc17dc
|
@ -3,7 +3,6 @@ const webpack = require('webpack');
|
|||
const CheckerPlugin = require('awesome-typescript-loader').CheckerPlugin;
|
||||
const StringReplacePlugin = require("string-replace-webpack-plugin");
|
||||
const CommonsChunkPlugin = require('webpack/lib/optimize/CommonsChunkPlugin');
|
||||
const ngcWebpack = require('ngc-webpack');
|
||||
|
||||
const VERSION = JSON.stringify(require('../package.json').version);
|
||||
|
||||
|
@ -123,15 +122,15 @@ module.exports = function (options) {
|
|||
}
|
||||
};
|
||||
|
||||
if (options.AOT) {
|
||||
conf.plugins.push(
|
||||
new ngcWebpack.NgcWebpackPlugin({
|
||||
disable: !options.AOT,
|
||||
tsConfig: root('tsconfig.webpack.json'),
|
||||
resourceOverride: root('build/resource-override.js')
|
||||
})
|
||||
);
|
||||
}
|
||||
// if (options.AOT) {
|
||||
// conf.plugins.push(
|
||||
// new ngcWebpack.NgcWebpackPlugin({
|
||||
// disable: !options.AOT,
|
||||
// tsConfig: root('tsconfig.webpack.json'),
|
||||
// resourceOverride: root('build/resource-override.js')
|
||||
// })
|
||||
// );
|
||||
// }
|
||||
|
||||
return conf;
|
||||
}
|
||||
|
|
|
@ -49,18 +49,6 @@ const config = webpackMerge(commonConfig({
|
|||
minimize: true,
|
||||
debug: false
|
||||
}),
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
compress: {
|
||||
warnings: false,
|
||||
screw_ie8: true,
|
||||
negate_iife: false // for lazy v8
|
||||
},
|
||||
mangle: { screw_ie8 : true },
|
||||
output: {
|
||||
comments: false
|
||||
},
|
||||
sourceMap: true
|
||||
}),
|
||||
new webpack.BannerPlugin(BANNER)
|
||||
]
|
||||
})
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
const webpack = require('webpack');
|
||||
|
||||
const root = require('./helpers').root;
|
||||
const path = require('path');
|
||||
|
||||
const webpackMerge = require('webpack-merge'); // used to merge webpack configs
|
||||
const commonConfig = require('./webpack.common.js');
|
||||
|
@ -57,6 +58,10 @@ module.exports = webpackMerge(commonConfig({
|
|||
/\.tmp[\\\/].*$/,
|
||||
/dist[\\\/].*$/,
|
||||
/(?:[^\\\/]*(?:[\\\/]|$))*[^\\\/]*\.css$/ // ignore css files
|
||||
])
|
||||
]),
|
||||
new webpack.ContextReplacementPlugin(
|
||||
/angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/,
|
||||
path.resolve(__dirname, '../src')
|
||||
)
|
||||
],
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue
Block a user