You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
730 B
32 lines
730 B
const path = require('path');
|
|
const ClosureCompilerPlugin = require('webpack-closure-compiler');
|
|
|
|
module.exports = {
|
|
mode: 'production',
|
|
entry: path.resolve(__dirname, './minimal.ts'),
|
|
output: {
|
|
path: path.resolve(__dirname, './'),
|
|
library: 'minimal.js',
|
|
libraryTarget: 'umd',
|
|
filename: 'minimal.js'
|
|
},
|
|
resolve: {
|
|
extensions: ['.ts', '.tsx', '.js']
|
|
},
|
|
module: {
|
|
rules: [
|
|
// files with `.ts` or `.tsx` extension will be handled by `ts-loader`
|
|
{ test: /\.tsx?$/, loader: 'ts-loader' }
|
|
]
|
|
},
|
|
stats: 'errors-only',
|
|
plugins: [
|
|
new ClosureCompilerPlugin({
|
|
compiler: {
|
|
language_out: 'ECMASCRIPT5',
|
|
process_common_js_modules: true,
|
|
}
|
|
})
|
|
]
|
|
}
|