GithubHelp home page GithubHelp logo

Comments (14)

hugohil avatar hugohil commented on July 19, 2024

Hi!

Could you provide the content of you webpack config please ? Looks a lot like a webpack issue.

from idle-vue.

langerc avatar langerc commented on July 19, 2024

Here are all the files - the source is the cli

I found multiple users with the same or a simmilar problem but no solution yet.

build.zip

from idle-vue.

Ashirogi-Muto avatar Ashirogi-Muto commented on July 19, 2024

webpack:-

var path = require('path')
var webpack = require('webpack')
const friendlyErrorsPlugin = require('friendly-errors-webpack-plugin');


module.exports = {
	entry: './src/main.js',
	output: {
		path: path.resolve(__dirname, './dist'),
		publicPath: '/dist/',
		filename: 'build.js'
	},
	module: {
		rules: [
			{
				test: /\.vue$/,
				loader: 'vue-loader',
				options: {
					loaders: {
						css: 'vue-style-loader!css-loader',
						scss: 'vue-style-loader!css-loader!sass-loader'
					}
				}
			},
			{
				test: /\.css$/,
				use: ['vue-style-loader', 'css-loader']
			},
			{
				test: /\.scss$/,
				use: ['vue-style-loader', 'css-loader', 'sass-loader']
			},
			{
				test: /\.js$/,
				loader: 'babel-loader',
				exclude: /node_modules/
			},
			{
				test: /\.(png|jpg|gif|svg)$/,
				loader: 'file-loader',
				options: {
					name: '[name].[ext]?[hash]'
				}
			}
		]
	}, plugins: [
		new friendlyErrorsPlugin()
	],
	resolve: {
		alias: {
			'vue$': 'vue/dist/vue.esm.js'
		}
	},
	devServer: {
		historyApiFallback: true,
		noInfo: true
	},
	performance: {
		hints: false
	},
	devtool: '#eval-source-map'
}

if (process.env.NODE_ENV === 'production') {
	module.exports.devtool = '#source-map'
	// http://vue-loader.vuejs.org/en/workflow/production.html
	module.exports.plugins = (module.exports.plugins || []).concat([
		new webpack.DefinePlugin({
			'process.env': {
				NODE_ENV: '"production"'
			}
		}),
		new webpack.optimize.UglifyJsPlugin({
			sourceMap: true,
			compress: {
				warnings: false
			}
		}),
		new webpack.LoaderOptionsPlugin({
			minimize: true
		})
	])
}

from idle-vue.

hugohil avatar hugohil commented on July 19, 2024

Can you try to add

extensions: ['.js', '.vue']

in the resolve property please ?

from idle-vue.

langerc avatar langerc commented on July 19, 2024

First- Thanks a lot!!
I added it to the webpack.main.js since it was present in the others already.

error does not change:
idle-vue/index.js - error line:3 unexpected token import.

from idle-vue.

hugohil avatar hugohil commented on July 19, 2024

Well, seems like error changed, since it's not related to file extension but with import statement, thus probably ES6/Babel. What Babel preset do you use ?

from idle-vue.

langerc avatar langerc commented on July 19, 2024

Well i hope this is what you are looking for

{
  "comments": false,
  "env": {
    "main": {
      "presets": [
        ["env", {
          "targets": { "node": 7 }
        }],
        "stage-0"
      ]
    },
    "renderer": {
      "presets": [
        ["env", {
          "modules": false
        }],
        "stage-0"
      ]
    },
    "web": {
      "presets": [
        ["env", {
          "modules": false
        }],
        "stage-0"
      ]
    }
  },
  "plugins": ["transform-runtime"]
}

from idle-vue.

hugohil avatar hugohil commented on July 19, 2024

Can you try to remove the { "modules": false }] property please ?
Also, what target/device/browser are you building for ?

from idle-vue.

langerc avatar langerc commented on July 19, 2024

same thing .. i use electron.

from idle-vue.

hugohil avatar hugohil commented on July 19, 2024

Which version ?

from idle-vue.

langerc avatar langerc commented on July 19, 2024

1.7.5

from idle-vue.

hugohil avatar hugohil commented on July 19, 2024

Please update idle-vue to version 2.0.2, it is fixed now.

from idle-vue.

rajeshwar-fissionhq avatar rajeshwar-fissionhq commented on July 19, 2024

It's not fixed yet.

from idle-vue.

hugohil avatar hugohil commented on July 19, 2024

Thanks @rajeshwar-fissionhq.
It should be fixed with 2.0.3. Sorry for that.

from idle-vue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.