diff options
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..ca25b27 --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,39 @@ +const path = require("path"); + +module.exports = { + target: "node", + entry: "src/index.ts", + devtool: "source-map", + context: __dirname, + mode: "development", + output: { + path: path.resolve(__dirname, "dist"), + filename: "index.js", + pathinfo: true, + libraryTarget: "umd" + }, + resolve: { + modules: [".", "src", "node_modules"].map(x => path.join(__dirname, x)), + extensions: [ ".js", ".ts" ] + }, + module: { + rules: [ + { + test: /\.ts$/, + loader: "ts-loader", + options: { + configFile: path.resolve(__dirname, "tsconfig.json") + } + }, + { + test: /\.scss/, + use: [ "style-loader", "css-loader", "sass-lodaer" ] + }, + { + test: /\.pug$/, + use: [ "apply-loader", "pug-loader" ] + } + ] + }, + externals: [ "fs", "ngx-toastr", /^rxjs/, /^@angular/, /^@ng-bootstrap/, /^tabby-/ ] +}; |
