tskredens/webpack.config.ts

35 lines
826 B
TypeScript
Raw Normal View History

2019-10-06 21:49:54 +02:00
import path from "path";
2019-10-06 23:53:59 +02:00
import VueLoaderPlugin from "vue-loader/lib/plugin"; // tslint:disable-line:no-implicit-dependencies
2019-10-06 21:49:54 +02:00
import webpack from "webpack"; // tslint:disable-line:no-implicit-dependencies
const config: webpack.Configuration = {
devtool: "inline-source-map",
entry: "./src/frontend/index.ts",
mode: "development",
module: {
rules: [
{
exclude: /node_modules/,
2019-10-06 23:53:59 +02:00
loader: "ts-loader",
options: { appendTsSuffixTo: [/\.vue$/] },
test: /\.ts?$/
},
{
loader: "vue-loader",
test: /.vue$/
2019-10-06 21:49:54 +02:00
}
]
},
output: {
filename: "[name].bundle.js",
path: path.resolve(__dirname, "dist"),
publicPath: "/assets/"
},
2019-10-06 23:53:59 +02:00
plugins: [new VueLoaderPlugin()],
2019-10-06 21:49:54 +02:00
resolve: {
2019-10-06 23:53:59 +02:00
extensions: [".ts", ".js"]
2019-10-06 21:49:54 +02:00
}
};
export default config;