caiobiodere / cordova-template-framework7-vue-webpack

Framework7 - Vue - Webpack Cordova Template with Webpack Dev Server and Hot Module Replacement
Apache License 2.0
621 stars 154 forks source link

webpack out file question #172

Closed izengliang closed 4 years ago

izengliang commented 5 years ago

Error

image

shell

cordova run browser -- --live-reload

About Code

config/webpack.common.js

...
    module: {
      rules: [
        {
          test: /\.ts$/,
          loader: "ts-loader"
        },
        {
          test: /\.js$/,
          exclude: /node_modules(\/|\\)(?!(framework7|framework7-vue|template7|dom7)(\/|\\)).*/,
          use: {
            loader: "babel-loader",
            options: {
              presets: [["env", {
                targets:{
                  "chrome": "78"
                }
              }]],
              plugins: ["transform-object-rest-spread"]
            }
          }
        }
...

tsconfig.json

{
  "compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "declaration": false,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "lib": ["dom", "es2017"],
    "module": "es2015",
    "moduleResolution": "node",
    "sourceMap": true,
    "target": "esnext",
    "typeRoots": ["node_modules/@types"]
  },
  "include": ["src/**/*.ts"],
  "exclude": ["node_modules"],
  "compileOnSave": false,
  "downlevelIteration":true
}

User.ts

export class User {}
caiobiodere commented 5 years ago

@leozale could you please just check this link first -> https://alexjover.com/blog/integrate-typescript-in-your-vue-project/

caiobiodere commented 4 years ago

Hi @zalelion hope you are having a good day, I just did some tests with your comments, and everything seems to work perfectly now, could you please try it again with the new 2.4.3 Version