Permalink
Browse files

feat: Improve compatibility with other plugins that uses query parame…

…ters (vuejs#185)

change old query syntax:
{path}.vue?{ type: string, index?: number }#.{lang}

to:
{path}.vue.{lang}?rollup_plugin_vue={ type: string, lang: string, index?: number }

Plugins, like rollup-plugin-postcss also uses query params
for itself purpose, in this case if we provide { css: false } as options
to rollup-plugin-vue then we will get error from rollup, because
postcss can not recognize file ".vue?{...}#.css" as css file
and rollup-plugin-vue done its work also.

Rollup config where vue + postcss is not work:

export default [
  {
    input: '...',
    output: [
      {
        file: '...',
        format: 'es'
      }
    ],
    plugins: [
      // ...
      vue({
        css: false,
      }),
      postcss()
    ]
  }
];
  • Loading branch information...
Hokid authored and znck committed May 5, 2018
1 parent 3d1d210 commit 4110dbb13594c3d0de8386d5eb74d9d773fe3231
Showing with 6,715 additions and 1,876 deletions.
  1. +9 −3 .babelrc
  2. +6,665 −1,850 package-lock.json
  3. +2 −1 package.json
  4. +2 −0 src/index.js
  5. +37 −22 src/utils.js
@@ -1,9 +1,15 @@
{
"presets": [
[ "es2015", { "modules": false }],
"stage-2"
[
"@babel/preset-env",
{
"target": "node"
}
]
],
"plugins": [
"@babel/transform-runtime"
],
"plugins": ["transform-runtime"],
"retainLines": true,
"comments": true
}
Oops, something went wrong.

0 comments on commit 4110dbb

Please sign in to comment.