I'am trying to setup vue3 with webpack and typescript.
Currently I have the problem that whenever I try to run webpack serve, there will be a warning inside the browser console:
runtime-core.esm-bundler.js:3413 You are running the esm-bundler build of Vue. It is recommended to configure your bundler to explicitly replace feature flag globals with boolean literals to get proper tree-shaking in the final bundle. See http://link.vuejs.org/feature-flags for more details.
Which I do not understand. My webpack-config is as follows:
const path = require("path")
module.exports = {
mode: 'development',
entry: './src/index.ts',
devtool: 'inline-source-map',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
resolve: {
alias: {
vue: "vue/dist/vue.esm-bundler.js"
},
extensions: ['.tsx', '.ts', '.js'],
},
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
},
}
And this is the tsconfig:
{
"compilerOptions": {
"outDir": "./dist/",
"noImplicitAny": true,
"module": "es6",
"target": "es5",
"allowJs": true,
"moduleResolution": "node"
}
}
I would like to have a configuration without this warning and then move on to having support for sfc!