diff --git a/CHANGELOG.md b/CHANGELOG.md
index c503a3cd42e..2f6d0c633a2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,29 @@
> [standard-version](https://github.com/conventional-changelog/standard-version) for commit
> guidelines.
+
+
+## [v2.0.0-rc.18](https://github.com/bootstrap-vue/bootstrap-vue/compare/v2.0.0-rc.17...v2.0.0-rc.18)
+
+Released 2019-04-08
+
+### Bug Fixes v2.0.0-rc.18
+
+- **build:** enable babel option to interop default (fixes
+ [#3038](https://github.com/bootstrap-vue/bootstrap-vue/issues/3038))
+ ([#3046](https://github.com/bootstrap-vue/bootstrap-vue/issues/3046)
+ [4e981c2](https://github.com/bootstrap-vue/bootstrap-vue/commit/4e981c2))
+- **typescript:** replaced invalid `mixed` keyword with `any` (fixes
+ [#3041](https://github.com/bootstrap-vue/bootstrap-vue/issues/3041))
+ ([#3043](https://github.com/bootstrap-vue/bootstrap-vue/issues/3043)
+ [36e8246](https://github.com/bootstrap-vue/bootstrap-vue/commit/36e8246))
+
+### Features v2.0.0-rc.18
+
+- **nuxt:** add `usePretranspiled` option
+ ([#3048](https://github.com/bootstrap-vue/bootstrap-vue/issues/3048)
+ [8022481](https://github.com/bootstrap-vue/bootstrap-vue/commit/8022481))
+
## [v2.0.0-rc.17](https://github.com/bootstrap-vue/bootstrap-vue/compare/v2.0.0-rc.16...v2.0.0-rc.17)
diff --git a/babel.config.js b/babel.config.js
index 5fd6a01bb25..4b86e2e3f18 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -10,7 +10,7 @@ module.exports = api => {
presets,
env: {
es: {
- plugins: [['@babel/plugin-transform-modules-commonjs', { noInterop: true, loose: true }]]
+ plugins: [['@babel/plugin-transform-modules-commonjs', { loose: true }]]
},
test: {
presets: [['@babel/env', { targets: { node: 'current' } }]]
diff --git a/docs/markdown/intro/README.md b/docs/markdown/intro/README.md
index d9e0fffa634..919ea6aea4a 100644
--- a/docs/markdown/intro/README.md
+++ b/docs/markdown/intro/README.md
@@ -56,7 +56,7 @@ _after_ Bootstrap SCSS to ensure variables are set up correctly.
**Note**: _Requires webpack configuration to load CSS/SCSS files
([official guide](https://webpack.js.org/guides/asset-management/#loading-css))_.
-## Nuxt.js plugin module
+## Nuxt.js Module
[Nuxt.js](https://nuxtjs.org) version {{ nuxtVersion }} (or greater) is recommended.
@@ -153,6 +153,14 @@ module.exports = {
}
```
+### Using pretranspiled version of BootstrapVue for Nuxt.js
+
+Nuxt module uses precompiled version of BootstrapVue for faster development builds and source of
+BootstrapVue for higher quality production builds.
+
+You can override this option using `usePretranspiled` option. Setting to `true` uses `es/` instead
+of `src/`. By default is enabled for development mode only.
+
## Vue CLI 2
BootstrapVue has two Vue CLI templates available:
diff --git a/nuxt/index.js b/nuxt/index.js
index 735e7233a07..db9fd311f78 100644
--- a/nuxt/index.js
+++ b/nuxt/index.js
@@ -47,10 +47,15 @@ module.exports = function nuxtBootstrapVue(moduleOptions = {}) {
this.options.css.unshift('bootstrap/dist/css/bootstrap.css')
}
- // Transpile src
+ // Transpile src/
this.options.build.transpile.push('bootstrap-vue/src')
- const templateOptions = {}
+ // Use es/ or src/
+ const usePretranspiled = pickFirst(options.usePretranspiled, this.options.dev)
+
+ const templateOptions = {
+ dist: usePretranspiled ? 'es' : 'src'
+ }
// TODO: Also add support for individual components & directives
for (const type of ['componentPlugins', 'directivePlugins']) {
diff --git a/nuxt/plugin.template.js b/nuxt/plugin.template.js
index 4b5b4123f51..db2a857fae9 100644
--- a/nuxt/plugin.template.js
+++ b/nuxt/plugin.template.js
@@ -1,10 +1,10 @@
import Vue from 'vue'
<% if (options.componentPlugins.length || options.directivePlugins.length) { %><%=
-options.componentPlugins.reduce((acc, p) => (acc += `import ${p[0]} from 'bootstrap-vue/es/components/${p[1]}'\n` ), '') %><%=
-options.directivePlugins.reduce((acc, p) => (acc += `import ${p[0]} from 'bootstrap-vue/es/directives/${p[1]}'\n` ), '') %>
+options.componentPlugins.reduce((acc, p) => (acc += `import ${p[0]} from 'bootstrap-vue/${options.dist}/components/${p[1]}'\n` ), '') %><%=
+options.directivePlugins.reduce((acc, p) => (acc += `import ${p[0]} from 'bootstrap-vue/${options.dist}/directives/${p[1]}'\n` ), '') %>
<% if (options.config) { %>
-import BVConfigPlugin from 'bootstrap-vue/es/bv-config'
+import BVConfigPlugin from 'bootstrap-vue/<%= options.dist %>/bv-config'
Vue.use(BVConfigPlugin, <%= JSON.stringify(options.config, undefined, 2) %>)
<% } %>
@@ -13,7 +13,7 @@ Vue.use(BVConfigPlugin, <%= JSON.stringify(options.config, undefined, 2) %>)
options.componentPlugins.reduce((acc, p) => (acc += `Vue.use(${p[0]})\n` ), '') %><%=
options.directivePlugins.reduce((acc, p) => (acc += `Vue.use(${p[0]})\n` ), '') %>
<% } else { %>
-import BootstrapVue from 'bootstrap-vue/es'
+import BootstrapVue from 'bootstrap-vue/<%= options.dist %>'
Vue.use(BootstrapVue, <%= JSON.stringify(options.config || {}, undefined, 2) %>)
<% } %>
diff --git a/package.json b/package.json
index bd885e802f9..3a1b8d3cee0 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "bootstrap-vue",
- "version": "2.0.0-rc.17",
+ "version": "2.0.0-rc.18",
"description": "BootstrapVue provides one of the most comprehensive implementations of Bootstrap 4 components and grid system for Vue.js and with extensive and automated WAI-ARIA accessibility markup.",
"main": "dist/bootstrap-vue.common.js",
"types": "src/index.d.ts",
@@ -129,7 +129,7 @@
"terser": "^3.17.0",
"vue": "^2.6.10",
"vue-jest": "^3.0.4",
- "vue-router": "^3.0.2",
+ "vue-router": "^3.0.3",
"vue-server-renderer": "^2.6.10",
"vue-template-compiler": "^2.6.10"
},
diff --git a/scripts/build.sh b/scripts/build.sh
index 1f37445d86c..fe5b4e53775 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -15,7 +15,7 @@ echo 'Done.'
echo ''
echo 'Build ES modules...'
-NODE_ENV=es babel src --out-dir es --ignore 'src/**/*/fixtures,src/**/*.spec.js'
+NODE_ENV=es babel src --out-dir es --ignore 'src/**/*.spec.js'
echo 'Done.'
echo ''
diff --git a/scripts/rollup.config.esm.js b/scripts/rollup.config.esm.js
deleted file mode 100644
index 8d398854917..00000000000
--- a/scripts/rollup.config.esm.js
+++ /dev/null
@@ -1,34 +0,0 @@
-import fs from 'fs'
-import path from 'path'
-import babel from 'rollup-plugin-babel'
-import resolve from 'rollup-plugin-node-resolve'
-import commonjs from 'rollup-plugin-commonjs'
-import css from 'rollup-plugin-css-porter'
-import { name, dependencies } from '../package.json'
-
-const base = path.resolve(__dirname, '..')
-const src = path.resolve(base, 'src')
-const dist = path.resolve(base, 'dist')
-
-// Ensure dist directory exists
-if (!fs.existsSync(dist)) {
- fs.mkdirSync(dist)
-}
-
-export default {
- input: path.resolve(src, 'index.js'),
- external: Object.keys(dependencies),
- plugins: [
- css({ dest: path.resolve(dist, `${name}.css`) }),
- resolve({ external: ['vue'] }),
- commonjs(),
- babel()
- ],
- output: [
- {
- format: 'es',
- file: path.resolve(dist, `${name}.esm.js`),
- sourcemap: true
- }
- ]
-}
diff --git a/scripts/rollup.config.js b/scripts/rollup.config.js
index 18d6ae82999..2b79ab515e5 100644
--- a/scripts/rollup.config.js
+++ b/scripts/rollup.config.js
@@ -14,13 +14,14 @@ const externals = ['vue', ...Object.keys(dependencies)]
// Libs in `external` will not be bundled to dist,
// since they are expected to be provided later.
-// We want to include some of them in the build, so we exclude it here.
+// In some cases, wee want to include some of them in the build, so we
+// exclude the external here.
const externalExcludes = ['popper.js', 'vue-functional-data-merge']
// The base rollup configuration
const baseConfig = {
input: path.resolve(src, 'index.js'),
- external: Object.keys(dependencies),
+ external: externals,
plugins: [resolve({ external: ['vue'] }), commonjs(), babel({ exclude: 'node_modules/**' })]
}
@@ -57,10 +58,9 @@ export default [
}
},
- // ES
+ // ESM
{
...baseConfig,
- external: ['vue'],
output: {
format: 'es',
file: path.resolve(dist, `${name}.esm.js`),
diff --git a/src/index.d.ts b/src/index.d.ts
index de6e0e92998..28f1c10e201 100644
--- a/src/index.d.ts
+++ b/src/index.d.ts
@@ -25,7 +25,7 @@ declare module 'bootstrap-vue' {
| 'light'
| 'dark'
type SortDirection = 'asc' | 'desc' | 'last'
- type FormatterCallback = ((value: mixed, key: string, item: mixed) => any)
+ type FormatterCallback = ((value: any, key: string, item: any) => any)
export interface TableField {
label?: string
@@ -37,9 +37,9 @@ declare module 'bootstrap-vue' {
sortDirection?: SortDirection
tdClass?: string | string[] | FormatterCallback
thClass?: string | string[]
- thStyle?: mixed
+ thStyle?: any
variant?: TableVariant | string
- tdAttr?: mixed | ((value: mixed, key: string, item: mixed) => mixed)
+ tdAttr?: any | ((value: any, key: string, item: any) => any)
isRowHeader?: boolean
}
export interface TableFieldObject {
diff --git a/yarn.lock b/yarn.lock
index 0eec3048de7..10a8eab6cf0 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -11353,6 +11353,11 @@ vue-router@^3.0.2:
resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-3.0.2.tgz#dedc67afe6c4e2bc25682c8b1c2a8c0d7c7e56be"
integrity sha512-opKtsxjp9eOcFWdp6xLQPLmRGgfM932Tl56U9chYTnoWqKxQ8M20N7AkdEbM5beUh6wICoFGYugAX9vQjyJLFg==
+vue-router@^3.0.3:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-3.0.3.tgz#370ca607475c45a1cfab2d9d2ac846feab1c534c"
+ integrity sha512-62rB6GjJuyklnLL+yKST469yCYj93SXEn8rpYjxgLwv0aH/Fd6OApD8Hgi9RlraZ1OOwv3jPQvZTtf1GixYW+g==
+
vue-server-renderer@^2.6.10:
version "2.6.10"
resolved "https://registry.yarnpkg.com/vue-server-renderer/-/vue-server-renderer-2.6.10.tgz#cb2558842ead360ae2ec1f3719b75564a805b375"