Coder Social home page Coder Social logo

Upgrade to vue2 about vuepack HOT 11 CLOSED

egoist avatar egoist commented on September 27, 2024
Upgrade to vue2

from vuepack.

Comments (11)

kristianmandrup avatar kristianmandrup commented on September 27, 2024 1

Remove the part vue config part:

    vue: {
        loaders: {},
    }

Se my circle-menu config

from vuepack.

egoist avatar egoist commented on September 27, 2024

webpack has breaking changes since version 2.1.0-beta.22, lack of docs, not compatible with many loaders, so I will not update it for a while.

from vuepack.

kristianmandrup avatar kristianmandrup commented on September 27, 2024

Oh!? I had no idea. Thanks ;)

from vuepack.

kristianmandrup avatar kristianmandrup commented on September 27, 2024

Trying to use a similar approach in a vue component created using a generator:
Getting this error:

Can not load "webpack"!
  WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration has an unknown property 'vue'. These properties are valid:
   object { amd?, bail?, cache?, context?, dependencies?, devServer?, devtool?, entry, externals?, loader?, module?, name?, node?, output?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, stats?, target?, watch?, watchOptions? }
   For typos: please correct them.
   For loader options: webpack 2 no longer allows custom properties in configuration.
     Loaders should be updated to allow passing options via loader options in module.rules.
     Until loaders are updated one can use the LoaderOptionsPlugin to pass these options to the loader:
     plugins: {
       new webpack.LoaderOptionsPlugin({
         // test: /\.xxx$/, // may apply this only for some modules
         options: {
           vue: ...
         }
       })
     }

You seen this before? Is this the webpack issue you are talking about? I see you are also using the vue config option in webpack.base.config.js

module.exports = {
    module: {
        loaders: [{
            test: /\.js$/,
            loader: 'babel',
            exclude: /node_modules/
        }, {
            test: /\.vue$/,
            loaders: ['vue']
        }]
    },
    vue: {
        loaders: {},
    }
};

https://github.com/kristianmandrup/circle-menu

    "vue-loader": "^9.5.1",
    "vue-style-loader": "^1.0.0",
    "webpack": "2.1.0-beta.21",
    "webpack-dev-middleware": "^1.8.1",
    "webpack-hot-middleware": "^2.12.2",
    "webpack-dashboard": "^0.1.8",
    "webpack-dev-server": "^1.15.0",
    "webpack-merge": "^0.14.1"

from vuepack.

kristianmandrup avatar kristianmandrup commented on September 27, 2024

Related to this issue: webpack/webpack#3018

But I don't see your vue loader config having any real effect unless I'd want to use postcss.

from vuepack.

egoist avatar egoist commented on September 27, 2024

PR welcome for webpack 2 beta 23+ :)

from vuepack.

kristianmandrup avatar kristianmandrup commented on September 27, 2024

Looks like I have beta25 installed and it works just fine...

from vuepack.

 avatar commented on September 27, 2024

no @kristianmandrup i try in my i got error

throw new WebpackOptionsValidationError(webpackOptionsValidationErrors);
^
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

  • configuration has an unknown property 'vue'. These properties are valid:
    object { amd?, bail?, cache?, context?, dependencies?, devServer?, devtool?, entry, externals?, loader?, module?, name?, node?, output?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, stats?, target?, watch?, watchOptions? }
    For typos: please correct them.
    For loader options: webpack 2 no longer allows custom properties in configuration.
    Loaders should be updated to allow passing options via loader options in module.rules.
    Until loaders are updated one can use the LoaderOptionsPlugin to pass these options to the loader:
    plugins: {
    new webpack.LoaderOptionsPlugin({
    // test: /.xxx$/, // may apply this only for some modules
    options: {
    vue: ...
    }
    })
    }
  • configuration.resolve.extensions[0] should not be empty.
    at webpack (node_modules/webpack/lib/webpack.js:16:9)
    at Object. (/build/server.js:17:18)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)
    at startup (node.js:148:18)
    at node.js:405:3

from vuepack.

egoist avatar egoist commented on September 27, 2024

I will update webpack when its docs are ready.

from vuepack.

feusebio avatar feusebio commented on September 27, 2024

I changed version in package.json to "webpack": "^1.12.2" and webpack worked well. The newer versions didn't work, i don't know why:

$ webpack
Hash: a3e1a8f40ab9ed1a8b16
Version: webpack 1.15.0
Time: 2985ms
Asset Size Chunks Chunk Names
build.js 213 kB 0 [emitted] main
+ 10 hidden modules

from vuepack.

robertjchristian avatar robertjchristian commented on September 27, 2024

Could be conflicts in node_modules folder. Good idea to make sure it's clean.

Try:

rm -rf node_modules && npm install

from vuepack.

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.