vue-sfc-rollup
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -10,5 +10,16 @@ # Changelog | ||
### TODO | ||
- Refactor rollup configs - allow per-compile options | ||
- Add *browser* property to library-mode package.json for SSR usage | ||
## [1.1.1] - 2019-03-06 | ||
### Changed | ||
- Drop 'uglify-es' for 'terser' - uglify-es no longer maintained | ||
- Refactor rollup configs with per-compile options | ||
- Update template dependencies | ||
- vue 2.6.8 | ||
- vue-template-compiler 2.6.8 | ||
- rollup 1.4.1 | ||
- rollup-plugin-vue 4.7.2 | ||
- rollup-plugin-commonjs 9.2.1 | ||
## [1.1.0] - 2019-01-31 | ||
@@ -15,0 +26,0 @@ |
@@ -6,3 +6,3 @@ { | ||
"license": "ISC", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"bin": { | ||
@@ -9,0 +9,0 @@ "sfc-rollup-init": "./sfc-init.js" |
@@ -6,3 +6,3 @@ // rollup.config.js | ||
import replace from 'rollup-plugin-replace'; | ||
import uglify from 'rollup-plugin-uglify-es'; | ||
import { terser } from 'rollup-plugin-terser'; | ||
import minimist from 'minimist'; | ||
@@ -12,8 +12,4 @@ | ||
const config = { | ||
const baseConfig = { | ||
input: 'src/entry.js', | ||
output: { | ||
name: '<%-componentNamePascal%>', | ||
exports: 'named', | ||
}, | ||
plugins: [ | ||
@@ -35,7 +31,84 @@ replace({ | ||
// Only minify browser (iife) version | ||
if (argv.format === 'iife') { | ||
config.plugins.push(uglify()); | ||
// UMD/IIFE shared settings: externals and output.globals | ||
// Refer to https://rollupjs.org/guide/en#output-globals for details | ||
const external = [ | ||
// list external dependencies, exactly the way it is written in the import statement. | ||
// eg. 'jquery' | ||
]; | ||
const globals = { | ||
// Provide global variable names to replace your external imports | ||
// eg. jquery: '$' | ||
}; | ||
// Customize configs for individual targets | ||
const buildFormats = []; | ||
if (!argv.format || argv.format === 'es') { | ||
const esConfig = { | ||
...baseConfig, | ||
output: { | ||
file: 'dist/<%-componentName%>.esm.js', | ||
format: 'esm', | ||
exports: 'named', | ||
}, | ||
plugins: [ | ||
...baseConfig.plugins, | ||
terser({ | ||
output: { | ||
ecma: 6, | ||
}, | ||
}), | ||
], | ||
}; | ||
buildFormats.push(esConfig); | ||
} | ||
export default config; | ||
if (!argv.format || argv.format === 'umd') { | ||
const umdConfig = { | ||
...baseConfig, | ||
external, | ||
output: { | ||
compact: true, | ||
file: 'dist/<%-componentName%>.umd.js', | ||
format: 'umd', | ||
name: '<%-componentNamePascal%>', | ||
exports: 'named', | ||
globals, | ||
}, | ||
plugins: [ | ||
...baseConfig.plugins, | ||
terser({ | ||
output: { | ||
ecma: 6, | ||
}, | ||
}), | ||
], | ||
}; | ||
buildFormats.push(umdConfig); | ||
} | ||
if (!argv.format || argv.format === 'iife') { | ||
const unpkgConfig = { | ||
...baseConfig, | ||
external, | ||
output: { | ||
compact: true, | ||
file: 'dist/<%-componentName%>.min.js', | ||
format: 'iife', | ||
name: '<%-componentNamePascal%>', | ||
exports: 'named', | ||
globals, | ||
}, | ||
plugins: [ | ||
...baseConfig.plugins, | ||
terser({ | ||
output: { | ||
ecma: 5, | ||
}, | ||
}), | ||
], | ||
}; | ||
buildFormats.push(unpkgConfig); | ||
} | ||
// Export config | ||
export default buildFormats; |
@@ -17,6 +17,6 @@ { | ||
"scripts": { | ||
"build": "npm run build:unpkg & npm run build:es & npm run build:umd", | ||
"build:umd": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format umd --file dist/<%-componentName%>.umd.js", | ||
"build:es": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format es --file dist/<%-componentName%>.esm.js", | ||
"build:unpkg": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format iife --file dist/<%-componentName%>.min.js" | ||
"build": "cross-env NODE_ENV=production rollup --config build/rollup.config.js", | ||
"build:umd": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format umd", | ||
"build:es": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format es", | ||
"build:unpkg": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format iife" | ||
}, | ||
@@ -30,11 +30,11 @@ | ||
"minimist": "^1.2.0", | ||
"rollup": "^1.1.2", | ||
"rollup": "^1.4.1", | ||
"rollup-plugin-buble": "^0.19.6", | ||
"rollup-plugin-commonjs": "^9.2.0", | ||
"rollup-plugin-commonjs": "^9.2.1", | ||
"rollup-plugin-replace": "^2.1.0", | ||
"rollup-plugin-uglify-es": "0.0.1", | ||
"rollup-plugin-vue": "^4.6.2", | ||
"vue": "^2.5.22", | ||
"vue-template-compiler": "^2.5.22" | ||
"rollup-plugin-terser": "^4.0.4", | ||
"rollup-plugin-vue": "^4.7.2", | ||
"vue": "^2.6.8", | ||
"vue-template-compiler": "^2.6.8" | ||
} | ||
} |
@@ -6,3 +6,3 @@ // rollup.config.js | ||
import replace from 'rollup-plugin-replace'; | ||
import uglify from 'rollup-plugin-uglify-es'; | ||
import { terser } from 'rollup-plugin-terser'; | ||
import minimist from 'minimist'; | ||
@@ -12,8 +12,4 @@ | ||
const config = { | ||
const baseConfig = { | ||
input: 'src/entry.js', | ||
output: { | ||
name: '<%-componentNamePascal%>', | ||
exports: 'named', | ||
}, | ||
plugins: [ | ||
@@ -35,7 +31,84 @@ replace({ | ||
// Only minify browser (iife) version | ||
if (argv.format === 'iife') { | ||
config.plugins.push(uglify()); | ||
// UMD/IIFE shared settings: externals and output.globals | ||
// Refer to https://rollupjs.org/guide/en#output-globals for details | ||
const external = [ | ||
// list external dependencies, exactly the way it is written in the import statement. | ||
// eg. 'jquery' | ||
]; | ||
const globals = { | ||
// Provide global variable names to replace your external imports | ||
// eg. jquery: '$' | ||
}; | ||
// Customize configs for individual targets | ||
const buildFormats = []; | ||
if (!argv.format || argv.format === 'es') { | ||
const esConfig = { | ||
...baseConfig, | ||
output: { | ||
file: 'dist/<%-componentName%>.esm.js', | ||
format: 'esm', | ||
exports: 'named', | ||
}, | ||
plugins: [ | ||
...baseConfig.plugins, | ||
terser({ | ||
output: { | ||
ecma: 6, | ||
}, | ||
}), | ||
], | ||
}; | ||
buildFormats.push(esConfig); | ||
} | ||
export default config; | ||
if (!argv.format || argv.format === 'umd') { | ||
const umdConfig = { | ||
...baseConfig, | ||
external, | ||
output: { | ||
compact: true, | ||
file: 'dist/<%-componentName%>.umd.js', | ||
format: 'umd', | ||
name: '<%-componentNamePascal%>', | ||
exports: 'named', | ||
globals, | ||
}, | ||
plugins: [ | ||
...baseConfig.plugins, | ||
terser({ | ||
output: { | ||
ecma: 6, | ||
}, | ||
}), | ||
], | ||
}; | ||
buildFormats.push(umdConfig); | ||
} | ||
if (!argv.format || argv.format === 'iife') { | ||
const unpkgConfig = { | ||
...baseConfig, | ||
external, | ||
output: { | ||
compact: true, | ||
file: 'dist/<%-componentName%>.min.js', | ||
format: 'iife', | ||
name: '<%-componentNamePascal%>', | ||
exports: 'named', | ||
globals, | ||
}, | ||
plugins: [ | ||
...baseConfig.plugins, | ||
terser({ | ||
output: { | ||
ecma: 5, | ||
}, | ||
}), | ||
], | ||
}; | ||
buildFormats.push(unpkgConfig); | ||
} | ||
// Export config | ||
export default buildFormats; |
@@ -19,6 +19,6 @@ { | ||
"scripts": { | ||
"build": "npm run build:unpkg & npm run build:es & npm run build:umd", | ||
"build:umd": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format umd --file dist/<%-componentName%>.umd.js", | ||
"build:es": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format es --file dist/<%-componentName%>.esm.js", | ||
"build:unpkg": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format iife --file dist/<%-componentName%>.min.js" | ||
"build": "cross-env NODE_ENV=production rollup --config build/rollup.config.js", | ||
"build:umd": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format umd", | ||
"build:es": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format es", | ||
"build:unpkg": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format iife" | ||
}, | ||
@@ -32,11 +32,11 @@ | ||
"minimist": "^1.2.0", | ||
"rollup": "^1.1.2", | ||
"rollup": "^1.4.1", | ||
"rollup-plugin-buble": "^0.19.6", | ||
"rollup-plugin-commonjs": "^9.2.0", | ||
"rollup-plugin-commonjs": "^9.2.1", | ||
"rollup-plugin-replace": "^2.1.0", | ||
"rollup-plugin-uglify-es": "0.0.1", | ||
"rollup-plugin-vue": "^4.6.2", | ||
"vue": "^2.5.22", | ||
"vue-template-compiler": "^2.5.22" | ||
"rollup-plugin-terser": "^4.0.4", | ||
"rollup-plugin-vue": "^4.7.2", | ||
"vue": "^2.6.8", | ||
"vue-template-compiler": "^2.6.8" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27283
490