Skip to content

Commit

Permalink
feature #763 Removing vue2 alias to use the full build (weaverryan)
Browse files Browse the repository at this point in the history
This PR was merged into the master branch.

Discussion
----------

Removing vue2 alias to use the full build

Fixes #674

Commits
-------

bece20e removing vue2 alias to use the full build
  • Loading branch information
weaverryan committed May 11, 2020
2 parents cd661d3 + bece20e commit 605c760
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@

## 0.30.0

* [BC BREAK] The Vue "build" was changed from `vue.esm.js` (full build) to
`vue.runtime.esm.js` (runtime build). With the runtime build, there are
two things that you cannot do:

A) You cannot pass a string to `template`:

```js
new Vue({
template: '<div>{{ hi }}</div>'
})
```

B) You cannot mount to a DOM element and use its HTML as your template:

```js
new Vue({
el: '#app', // where <div id="app"> contains your Vue template
});
```

If you need this behavior, call `Encore.addAliases({ vue$: 'vue/dist/vue.esm.js' });`

* [DEPENDENCY UPGRADE] `sass-loader` was upgraded from version 7 to 8.
See the [CHANGELOG](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md#800-2019-08-29)
for breaking changes. This likely will not affect you unless pass
Expand Down Expand Up @@ -38,6 +60,8 @@
thanks to @jdreesen.

* [DEPENDENCY UPGRADE] The `fork-ts-checker-webpack-plugin` package was upgraded for the tests

* The `fork-ts-checker-webpack-plugin` package was upgraded for the tests
from `^0.4.1` to `^4.0.0`. If you're using `enableForkedTypeScriptTypesChecking()`,
you control the `fork-ts-checker-webpack-plugin` version in your
`package.json` file. You should upgrade to `^4.0.0` to ensure
Expand Down
8 changes: 0 additions & 8 deletions lib/config-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const PluginPriorities = require('./plugins/plugin-priorities');
const applyOptionsCallback = require('./utils/apply-options-callback');
const sharedEntryTmpName = require('./utils/sharedEntryTmpName');
const copyEntryTmpName = require('./utils/copyEntryTmpName');
const getVueVersion = require('./utils/get-vue-version');
const tmp = require('tmp');
const fs = require('fs');
const path = require('path');
Expand Down Expand Up @@ -101,13 +100,6 @@ class ConfigGenerator {
alias: {}
};

if (this.webpackConfig.useVueLoader) {
const vueVersion = getVueVersion(this.webpackConfig);
if (vueVersion === 2) {
config.resolve.alias['vue$'] = 'vue/dist/vue.esm.js';
}
}

if (this.webpackConfig.usePreact && this.webpackConfig.preactOptions.preactCompat) {
config.resolve.alias['react'] = 'preact-compat';
config.resolve.alias['react-dom'] = 'preact-compat';
Expand Down

0 comments on commit 605c760

Please sign in to comment.