諸行無常

IT色々お勉強中のブログ

vue

webpack3→4でエラーになった MiniCssExtractPlugin

MiniCssExtractPluginの設定が上手くいってなくて動いてない webpack/environment.js const vue = require('./loaders/vue') const sass = require('./loaders/sass') const css = require('./loaders/css') module: { rules: [ vue, sass, css, plugins: [ …

SPAのAPIのCSRF保護

翻訳自分で読むため、許可は取ってない blog.eq8.eu 用語定義 SPAとはJavascriptのフレームワーク(vueとか)でページをレンダリングし、残りの通信はバックエンドapi(railsとか)でする事 ユーザーがアクティブなセッションで認証されているサーバーにユーザ…

vue-loaderとは

vue-loader vue-loaderはWebpack用のローダーです。これを使用すると、シングルファイルコンポーネント(SFC)と呼ばれる形式でVueコンポーネントを作成できます。 v15からpuluginの読み込みが必須になった const VueLoaderPlugin = require('vue-loader/lib…

Parsing error: Unexpected tokenで困ってる

yarn add -D eslint eslint-plugin-vue yarn remove eslint-plugin-html module.exports = { root: true, - parser: 'babel-eslint', parserOptions: { + parser: 'babel-eslint', sourceType: 'module' }, env: { browser: true, }, - // https://github.co…

babel-loader 'bindings' of nullエラー

Module build failed (from ./node_modules/babel-loader/lib/index.js): TypeError: Cannot read property 'bindings' of null at Scope.moveBindingTo (/usr/local/hoge/node_modules/@babel/traverse/lib/scope/index.js:864:13) TypeError: Cannot read …

webpack3→4でエラーになった babel-core

babel-coreが読み込めないらしい Error: Cannot find module '@babel/core' babel-loader@8 requires Babel 7.x (the package '@babel/core'). If you'd like to use Babel 6.x ('babel-core'), you should install 'babel-loader@7'. yarn upgrade babel-co…

webpack3→4でエラーになった Chunk

Chunk.jsでエラー 10% building 3/3 modules 0 active(node:135) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead ℹ 「wds」: Project is running at http://0.0.0.0:3035/ ℹ 「wds」: webpack output is served from /pack…

webpack3→4でエラーになった loaders

webpack3→4でエラーになった ✖ 「wds」: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. - configuration.module has an unknown property 'loaders'. These properties are …

webpack3→4でエラーになった webpack-cli

webpack3→4に帰るとエラーになった。 The CLI moved into a separate package: webpack-cli Please install 'webpack-cli' in addition to webpack itself to use the CLI -> When using npm: npm i -D webpack-cli -> When using yarn: yarn add -D webpack…

vueファイルの置き場所を設定

vueファイルの置き場所を設定 app/javascript/srcの位置を@で示せるようにする config/webpack/custom.js const utils = require('./utils') module.exports = { resolve: { extensions: ['.js', '.vue', '.json'], alias: { vue$: 'vue/dist/vue.esm.js', '…

vueを導入

qiita.com こいつ参考に、少し違ったとこを rails webpacker:install Webpacker requires Node.js >= 6.0.0 and you are using 5.7.0 Please upgrade Node.js https://nodejs.org/en/download/ nodeバージョン違うerror出たので nodebrew install-binary v6.…