diff options
author | Robin Appelman <robin@icewind.nl> | 2017-08-26 18:22:18 +0300 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2017-08-26 18:22:18 +0300 |
commit | 7514c06ee927d4fd642dd647789db05d75be59d4 (patch) | |
tree | 18a27c8739b0852252b079f39e82605e1f47fe55 /webpack.config.js | |
parent | 0e90067ab0976f7b08b85fa1ee2ab105c29cf337 (diff) |
switch to webpack for bundeling
Diffstat (limited to 'webpack.config.js')
-rw-r--r-- | webpack.config.js | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..4863c90 --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,39 @@ +const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); +const webpack = require('webpack'); +const path = require('path'); + +module.exports = { + entry: "./js/editor.ts", + output: { + filename: "build/editor.js" + }, + resolve: { + extensions: [".ts", ".js"] + }, + plugins: [ + new UglifyJSPlugin(), + new webpack.NamedModulesPlugin() + ], + module: { + loaders: [ + { + test: /\.ts/, + loader: "ts-loader" + }, + { + test: /\.js$/, + include: [ + path.resolve(__dirname, "js"), + path.resolve(__dirname, "node_modules/markdown-it-anchor"), + path.resolve(__dirname, "node_modules/markdown-it-highlightjs") + ], + use: { + loader: 'babel-loader' + } + } + ] + }, + node: { + fs: 'empty' + } +};
\ No newline at end of file |